contrib/jwrapper: revamp and merge extern_name and extern_class_name