1999-09-23 Tom Tromey <tromey@cygnus.com>
+ * java/lang/natFirstThread.cc (run): Renamed from `run0'. Removed
+ dead code.
+ * java/lang/FirstThread.java (run0): Renamed to `run'.
+ (run): Removed.
+
* prims.cc (main_init): New function.
(JvRunMain): Call it.
(_Jv_RunMain): Likewise.
final class FirstThread extends Thread
{
- public native void run0 ();
- public void run ()
- {
- try {
- run0 ();
- } catch (Throwable ex) {
- System.err.println ("uncaught exception at top level");
- ex.printStackTrace ();
- }
- }
+ public native void run ();
public FirstThread (ThreadGroup g, Class k, Object o)
{
typedef void main_func (jobject);
void
-java::lang::FirstThread::run0 (void)
+java::lang::FirstThread::run (void)
{
Utf8Const* main_signature = _Jv_makeUtf8Const ("([Ljava.lang.String;)V", 22);
Utf8Const* main_name = _Jv_makeUtf8Const ("main", 4);
-#if 0
- // Note: this turns out to be more painful than useful. Apparently
- // many people rely on being able to have main in a non-public
- // class.
- // This is based on my reading of 12.3.3.
- if (! java::lang::reflect::Modifier::isPublic(klass->getModifiers()))
- DIE ("class must be public");
-#endif
-
if (klass == NULL)
{
klass = java::lang::Class::forName (klass_name);