+
+/* table for locating native methods */
+
+typedef struct nativeref nativeref;
+typedef struct nativecompref nativecompref;
+
+struct nativeref {
+ char *classname;
+ char *methodname;
+ char *descriptor;
+ bool isstatic;
+ functionptr func;
+};
+
+/* table for fast string comparison */
+
+struct nativecompref {
+ utf *classname;
+ utf *methodname;
+ utf *descriptor;
+ bool isstatic;
+ functionptr func;
+};
+
+
+extern classinfo *class_java_lang_Class;
+extern classinfo *class_java_lang_VMClass;
+extern classinfo *class_java_lang_System;
+extern classinfo *class_java_lang_ClassLoader;
+extern classinfo *class_java_lang_Double;
+extern classinfo *class_java_lang_Float;
+extern classinfo *class_java_lang_Long;
+extern classinfo *class_java_lang_Byte;
+extern classinfo *class_java_lang_Short;
+extern classinfo *class_java_lang_Boolean;
+extern classinfo *class_java_lang_Void;
+extern classinfo *class_java_lang_Character;
+extern classinfo *class_java_lang_Integer;
+
+
+/* the system classloader object */
+extern java_lang_ClassLoader *SystemClassLoader;
+
+/* for raising exceptions from native methods */
+/* extern java_objectheader* exceptionptr; */
+
+/* javastring-hashtable */
+extern hashtable string_hash;
+
+void use_class_as_object(classinfo *c);
+
+/* load classes required for native methods */
+void native_loadclasses();
+
+/* find native function */
+functionptr native_findfunction(utf *cname, utf *mname,
+ utf *desc, bool isstatic);
+
+/* creates a new object of type java/lang/String from a utf-text */
+/* java_objectheader *javastring_new(utf *text); */
+java_lang_String *javastring_new(utf *text);
+
+/* creates a new object of type java/lang/String from a c-string */
+/* java_objectheader *javastring_new_char(char *text); */
+java_lang_String *javastring_new_char(char *text);
+
+/* make c-string from a javastring (debugging) */
+char *javastring_tochar(java_objectheader *s);
+
+/* create new object on the heap and call the initializer */
+java_objectheader *native_new_and_init(classinfo *c);
+
+/* create new object on the heap and call the initializer
+ mainly used for exceptions with a message */
+java_objectheader *native_new_and_init_string(classinfo *c, java_lang_String *s);
+
+/* create new object on the heap and call the initializer
+ mainly used for exceptions with an index */
+java_objectheader *native_new_and_init_int(classinfo *c, s4 i);
+
+/* create new object on the heap and call the initializer
+ mainly used for exceptions with cause */
+java_objectheader *native_new_and_init_throwable(classinfo *c, java_lang_Throwable *t);
+
+/* add property to system-property vector */