#include "native/vm/nativevm.hpp"
#include "vm/class.hpp"
+#include "vm/exceptions.hpp"
#include "vm/initialize.hpp"
#include "vm/method.hpp"
#include "vm/options.h"
*******************************************************************************/
-void nativevm_init(void)
+bool nativevm_init(void)
{
TRACESUBSYSTEMINITIALIZATION("nativevm_init");
false);
if (m == NULL)
- os::abort("nativevm_init: Error resolving java.lang.System.initializeSystemClass()");
+ return false;
(void) vm_call_method(m, NULL);
+ if (exceptions_get_exception() != NULL)
+ return false;
+
# else
# error unknown classpath configuration
# endif
#else
# error unknown Java configuration
#endif
+
+ return true;
}
/* function prototypes ********************************************************/
void nativevm_preinit(void);
-void nativevm_init(void);
+bool nativevm_init(void);
#if defined(ENABLE_JAVASE)
# if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
/* Initialize the native VM subsystem. */
/* AFTER: threads_init (at least for SUN's classes) */
- nativevm_init();
+ if (!nativevm_init())
+ os::abort("vm_create: nativevm_init failed");
#if defined(ENABLE_PROFILING)
/* initialize profiling */