| @@ -29,6 +29,25 @@ GetVersion() : int · 28 unmodified lines |
| 29 | 29 | return( JNI_VER ); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | +InternalFindClass( name : string ) : ClassData |
| 33 | +{ |
| 34 | + # return class data adt used by the Java Loader |
| 35 | + # which stores all the class information. |
| 36 | + # WARNING: does not loads the class. Only use |
| 37 | + # when you know what you are doing |
| 38 | + # WARNING: arrays are not supported. |
| 39 | + |
| 40 | + # replace all ocurrences of "." with "/" in name |
| 41 | + newname : string; |
| 42 | + for(x:=0;x<len name; x++) |
| 43 | + { |
| 44 | + if (name[x]=='.') |
| 45 | + newname[x] = '/'; |
| 46 | + else |
| 47 | + newname[x] = name[x]; |
| 48 | + } |
| 49 | + return jldr->getclass(newname); |
| 50 | +} |
| 32 | 51 | |
| 33 | 52 | FindClass( name : string ) : ClassData |
| 34 | 53 | { |
| @@ -712,7 +731,10 @@ NewClassObject( targ_class : ClassData ) : JClass · 677 unmodified lines |
| 712 | 731 | { |
| 713 | 732 | # create an instance of java.lang.Class |
| 714 | 733 | cl_data := classclass(); |
| 715 | | − return( JClass(classclass().moddata, targ_class, nil) ); |
| 734 | + object := cast->ToJClass(NewObject(cl_data)); |
| 735 | + object.class = targ_class; |
| 736 | + |
| 737 | + return( object ); |
| 716 | 738 | } |
| 717 | 739 | |
| 718 | 740 | |
| @@ -944,6 +966,7 @@ MainThreadGroup() : JObject · 225 unmodified lines |
| 944 | 966 | |
| 945 | 967 | FatalError( msg : string ) |
| 946 | 968 | { |
| 969 | + sys->print("Fatal error: %s\n", msg); |
| 947 | 970 | ThrowException( "java/lang/InternalError", msg ); |
| 948 | 971 | } |
| 949 | 972 | |