#include "native/include/java_lang_Object.h" /* required by j.l.C */
#include "native/include/java_lang_String.h" /* required by j.l.C */
-#if defined(WITH_CLASSPATH_SUN)
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
# include "native/include/java_nio_ByteBuffer.h" /* required by j.l.CL */
# include "native/include/java_lang_ClassLoader.h" /* required by j.l.C */
#endif
#include "vm/finalizer.h"
#include "vm/global.h"
#include "vm/initialize.h"
-#include "vm/package.h"
+#include "vm/package.hpp"
#include "vm/primitive.h"
#include "vm/properties.h"
#include "vm/signallocal.h"
/* When we're building with JRE-layout, the default paths are the
same as the runtime paths. */
#else
-# if defined(WITH_CLASSPATH_GNU)
- puts(" gnu.classpath.boot.library.path: "CLASSPATH_LIBDIR);
- puts(" java.boot.class.path : "CACAO_VM_ZIP":"CLASSPATH_CLASSES"");
-# elif defined(WITH_CLASSPATH_SUN)
- puts(" sun.boot.library.path : "CLASSPATH_LIBDIR);
- puts(" java.boot.class.path : "CLASSPATH_CLASSES);
+# if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
+ puts(" gnu.classpath.boot.library.path: "JAVA_RUNTIME_LIBRARY_LIBDIR);
+ puts(" java.boot.class.path : "CACAO_VM_ZIP":"JAVA_RUNTIME_LIBRARY_CLASSES"");
+# elif defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
+ puts(" sun.boot.library.path : "JAVA_RUNTIME_LIBRARY_LIBDIR);
+ puts(" java.boot.class.path : "JAVA_RUNTIME_LIBRARY_CLASSES);
# endif
#endif
printf(" initial heap size : %d\n", opt_heapstartsize);
printf(" stack size : %d\n", opt_stacksize);
-#if defined(WITH_CLASSPATH_GNU)
+#if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
printf(" gnu.classpath.boot.library.path: %s\n", properties_get("gnu.classpath.boot.library.path"));
-#elif defined(WITH_CLASSPATH_SUN)
+#elif defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK)
printf(" sun.boot.library.path : %s\n", properties_get("sun.boot.library.path"));
#endif
/* BEFORE: loader_preinit */
- package_init();
+ Package_initialize();
/* AFTER: utf8_init, classcache_init */
int status;
int i;
-#if defined(ENABLE_THREADS)
- threadobject *t;
-#endif
+ // Prevent compiler warnings.
+ oa = NULL;
#if !defined(NDEBUG)
if (compileall) {
/* Detach the main thread so that it appears to have ended when
the application's main method exits. */
- t = thread_get_current();
-
- if (!threads_detach_thread(t))
+ if (!thread_detach_current_thread())
vm_abort("vm_run: Could not detach main thread.");
#endif
args.name = "DestroyJavaVM";
args.group = NULL;
- if (!threads_attach_current_thread(&args, false))
+ if (!thread_attach_current_thread(&args, false))
return 1;
/* Wait until we are the last non-daemon thread. */