PR123: LD_LIBRARY_PATH and java.library.path
[cacao.git] / src / vm / properties.cpp
index c605efd658881a172dc66e796c3f6f4f59678887..985791cbe39236cd50026104d495c10d14a4562a 100644 (file)
@@ -32,7 +32,6 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
-#include <sys/utsname.h>
 
 #include "mm/memory.hpp"
 
@@ -315,7 +314,7 @@ Properties::Properties()
        put("java.vm.specification.version", "1.0");
        put("java.vm.specification.vendor", "Sun Microsystems Inc.");
        put("java.vm.specification.name", "Java Virtual Machine Specification");
-       put("java.vm.version", VERSION);
+       put("java.vm.version", VERSION_FULL);
        put("java.vm.vendor", "CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO");
        put("java.vm.name", "CACAO");
 
@@ -333,6 +332,14 @@ Properties::Properties()
                put("java.vm.info", "compiled mode");
        }
 
+       // Get and set java.library.path.
+       const char* java_library_path = os::getenv("LD_LIBRARY_PATH");
+
+       if (java_library_path == NULL)
+               java_library_path = "";
+
+       put("java.library.path", java_library_path);
+
 # if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
 
        /* Get properties from system. */
@@ -347,7 +354,7 @@ Properties::Properties()
 
        uname(utsnamebuf);
 
-       put("java.runtime.version", VERSION);
+       put("java.runtime.version", VERSION_FULL);
        put("java.runtime.name", "CACAO");
 
        put("java.specification.version", "1.5");
@@ -362,14 +369,6 @@ Properties::Properties()
 
        put("gnu.classpath.boot.library.path", boot_library_path);
 
-       // Get and set java.library.path.
-       const char* java_library_path = os::getenv("LD_LIBRARY_PATH");
-
-       if (java_library_path == NULL)
-               java_library_path = "";
-
-       put("java.library.path", java_library_path);
-
        put("java.io.tmpdir", "/tmp");
 
 #  if defined(ENABLE_INTRP)