#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"
/* 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. */