* Merged with default branch at rev 16f3633aaa5a.
[cacao.git] / src / native / vm / nativevm.c
index 8fe1c47263f1b9ccc1b357b7536c88afb4e49a24..00171814555aee3b998fb856eccdc6d5fca3a9d6 100644 (file)
 
 
 #include "config.h"
-
-#include <stdint.h>
-
-#if defined(WITH_CLASSPATH_SUN)
-# include <string.h>
-#endif
+#include "vm/types.h"
 
 #include "native/vm/nativevm.h"
 
 #include "vmcore/method.h"
 
 #if defined(WITH_CLASSPATH_SUN)
-# include "mm/memory.h"
-
 # include "native/native.h"
 
-# include "vm/properties.h"
 # include "vm/vm.h"
 
 # include "vmcore/class.h"
@@ -93,27 +85,10 @@ bool nativevm_preinit(void)
 
 # elif defined(WITH_CLASSPATH_SUN)
 
-       char        *boot_library_path;
-       int          len;
-       char        *p;
        utf         *u;
        lt_dlhandle  handle;
 
-       boot_library_path = properties_get("sun.boot.library.path");
-
-       len =
-               strlen(boot_library_path) +
-               strlen("/libjava.so") +
-               strlen("0");
-
-       p = MNEW(char, len);
-
-       strcpy(p, boot_library_path);
-       strcat(p, "/libjava.so");
-
-       u = utf_new_char(p);
-
-       MFREE(p, char, len);
+       u = utf_new_char(CLASSPATH_LIBDIR"/libjava.so");
 
        handle = native_library_open(u);
        native_library_add(u, NULL, handle);