+2001-06-15 Tom Tromey <tromey@redhat.com>
+
+ * java/lang/natRuntime.cc (_Jv_FindSymbolInExecutable): Return
+ NULL if no library on the list has the symbol.
+ (init): Call add_library on the program itself.
+ * prims.cc (JvRunMain): Initialize Runtime before searching for
+ `main'.
+ (_Jv_RunMain): Likewise.
+
2001-06-15 Tom Tromey <tromey@redhat.com>
* jni.cc (ClassClass): Removed; updated all users.
return r;
}
- return lt_dlsym (NULL, symname);
+ return NULL;
}
#else
finalize_on_exit = false;
#ifdef USE_LTDL
lt_dlinit ();
+ lt_dlhandle self = lt_dlopen (NULL);
+ if (self != NULL)
+ add_library (self);
#endif
}
_Jv_ThisExecutable (argv[0]);
#endif
+ // Get the Runtime here. We want to initialize it before searching
+ // for `main'; that way it will be set up if `main' is a JNI method.
+ java::lang::Runtime *rtime = java::lang::Runtime::getRuntime ();
+
main_thread = _Jv_AttachCurrentThread (JvNewStringLatin1 ("main"), NULL);
arg_vec = JvConvertArgv (argc - 1, argv + 1);
runFirst (klass, arg_vec);
int status = (int) java::lang::ThreadGroup::had_uncaught_exception;
- java::lang::Runtime::getRuntime ()->_exit (status);
+ rtime->_exit (status);
}
void
_Jv_ThisExecutable (exec_name);
#endif
+ // Get the Runtime here. We want to initialize it before searching
+ // for `main'; that way it will be set up if `main' is a JNI method.
+ java::lang::Runtime *rtime = java::lang::Runtime::getRuntime ();
+
main_thread = _Jv_AttachCurrentThread (JvNewStringLatin1 ("main"), NULL);
if (is_jar)
int status = (int) java::lang::ThreadGroup::had_uncaught_exception;
- java::lang::Runtime::getRuntime ()->exit (status);
+ rtime->exit (status);
}
\f