aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/natFirstThread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/natFirstThread.cc')
-rw-r--r--libjava/java/lang/natFirstThread.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libjava/java/lang/natFirstThread.cc b/libjava/java/lang/natFirstThread.cc
index d47446b..319e487 100644
--- a/libjava/java/lang/natFirstThread.cc
+++ b/libjava/java/lang/natFirstThread.cc
@@ -27,7 +27,7 @@ details. */
typedef void main_func (jobject);
void
-java::lang::FirstThread::run (void)
+java::lang::FirstThread::run0 (void)
{
Utf8Const* main_signature = _Jv_makeUtf8Const ("([Ljava.lang.String;)V", 22);
Utf8Const* main_name = _Jv_makeUtf8Const ("main", 4);
@@ -41,6 +41,12 @@ java::lang::FirstThread::run (void)
DIE ("class must be public");
#endif
+ if (klass == NULL)
+ {
+ klass = java::lang::Class::forName (klass_name);
+ if (klass != NULL) _Jv_InitClass (klass);
+ }
+
_Jv_Method *meth = _Jv_GetMethodLocal (klass, main_name, main_signature);
// Some checks from Java Spec section 12.1.4.