aboutsummaryrefslogtreecommitdiff
path: root/libjava/prims.cc
diff options
context:
space:
mode:
authorNathan Bryant <nbryant@optonline.net>2004-01-14 22:49:58 +0000
committerTom Tromey <tromey@gcc.gnu.org>2004-01-14 22:49:58 +0000
commit092b50e2d7faa1cf0441da77a0d2d72a983276b1 (patch)
treead1e4f95a199b5b83e6350405b779ee01410517f /libjava/prims.cc
parent84568e14b534a808707d9e0894c6021792ca633d (diff)
downloadgcc-092b50e2d7faa1cf0441da77a0d2d72a983276b1.zip
gcc-092b50e2d7faa1cf0441da77a0d2d72a983276b1.tar.gz
gcc-092b50e2d7faa1cf0441da77a0d2d72a983276b1.tar.bz2
re PR libgcj/12001 (_Jv_FindClass dumps core when Oracle's classes12.zip in $CLASSPATH)
PR libgcj/12001: * gnu/gcj/runtime/VMClassLoader.java (VMClassLoader): Pass empty array to superclass. (init): Changed interface; add URLs here. (initialize): New static method. * prims.cc (_Jv_CreateJavaVM): Initialize ClassLoader here... (_Jv_RunMain): ... not here. Co-Authored-By: Tom Tromey <tromey@redhat.com> From-SVN: r75889
Diffstat (limited to 'libjava/prims.cc')
-rw-r--r--libjava/prims.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/libjava/prims.cc b/libjava/prims.cc
index 26e8832..06791d3 100644
--- a/libjava/prims.cc
+++ b/libjava/prims.cc
@@ -1,6 +1,6 @@
// prims.cc - Code for core of runtime environment.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
This file is part of libgcj.
@@ -927,15 +927,24 @@ _Jv_CreateJavaVM (void* /*vm_args*/)
_Jv_InitClass (&java::lang::VMThrowable::class$);
java::lang::VMThrowable::trace_enabled = 0;
+ // We have to initialize this fairly early, to avoid circular class
+ // initialization. In particular we want to start the
+ // initialization of ClassLoader before we start the initialization
+ // of VMClassLoader.
+ _Jv_InitClass (&java::lang::ClassLoader::class$);
+ // Once the bootstrap loader is in place, change it into a kind of
+ // system loader, by having it read the class path.
+ gnu::gcj::runtime::VMClassLoader::initialize();
+
INIT_SEGV;
#ifdef HANDLE_FPE
INIT_FPE;
#endif
no_memory = new java::lang::OutOfMemoryError;
-
+
java::lang::VMThrowable::trace_enabled = 1;
-
+
#ifdef USE_LTDL
LTDL_SET_PRELOADED_SYMBOLS ();
#endif
@@ -988,12 +997,6 @@ _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv,
arg_vec = JvConvertArgv (argc - 1, argv + 1);
#endif
- // We have to initialize this fairly early, to avoid circular
- // class initialization. In particular we want to start the
- // initialization of ClassLoader before we start the
- // initialization of VMClassLoader.
- _Jv_InitClass (&java::lang::ClassLoader::class$);
-
using namespace gnu::gcj::runtime;
if (klass)
main_thread = new FirstThread (klass, arg_vec);