* Removed all Id tags.
[cacao.git] / src / vm / vm.c
index 99fc243051a5470a61f38a3c9cc98c4f5902b51a..4c7c09d2949878a0e8e656567d3d9fcbc5297d45 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: vm.c 8401 2007-08-22 18:45:31Z twisti $
-
 */
 
 
@@ -653,21 +651,35 @@ void vm_printconfig(void)
        printf("  maximum heap size              : %d\n", HEAP_MAXSIZE);
        printf("  initial heap size              : %d\n", HEAP_STARTSIZE);
        printf("  stack size                     : %d\n", STACK_SIZE);
-#if defined(WITH_CLASSPATH_GNU)
-       puts("  java.boot.class.path           : "CACAO_VM_ZIP":"CLASSPATH_CLASSES"");
+
+#if defined(WITH_JRE_LAYOUT)
+       /* When we're building with JRE-layout, the default paths are the
+          same as the runtime paths. */
 #else
-       puts("  java.boot.class.path           : "CLASSPATH_CLASSES"");
+# 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);
+# endif
 #endif
-       puts("  gnu.classpath.boot.library.path: "CLASSPATH_LIBDIR"/classpath\n");
+
+       puts("");
 
        puts("Runtime variables:\n");
        printf("  maximum heap size              : %d\n", opt_heapmaxsize);
        printf("  initial heap size              : %d\n", opt_heapstartsize);
        printf("  stack size                     : %d\n", opt_stacksize);
-       printf("  java.boot.class.path           : %s\n", properties_get("java.boot.class.path"));
-       printf("  java.class.path                : %s\n", properties_get("java.class.path"));
 
+#if defined(WITH_CLASSPATH_GNU)
        printf("  gnu.classpath.boot.library.path: %s\n", properties_get("gnu.classpath.boot.library.path"));
+#elif defined(WITH_CLASSPATH_SUN)
+       printf("  sun.boot.library.path          : %s\n", properties_get("sun.boot.library.path"));
+#endif
+
+       printf("  java.boot.class.path           : %s\n", properties_get("java.boot.class.path"));
+       printf("  java.class.path                : %s\n", properties_get("java.class.path"));
 }
 
 
@@ -869,8 +881,6 @@ bool vm_create(JavaVMInitArgs *vm_args)
 
                        class_path = properties_get("java.class.path");
 
-                       MFREE(class_path, char, len);
-
                        p = MNEW(char, strlen(opt_arg) + strlen("0"));
 
                        strcpy(p, opt_arg);
@@ -878,6 +888,8 @@ bool vm_create(JavaVMInitArgs *vm_args)
 #if defined(ENABLE_JAVASE)
                        properties_add("java.class.path", p);
 #endif
+
+                       MFREE(class_path, char, strlen(class_path));
                        break;
 
                case OPT_D:
@@ -902,16 +914,14 @@ bool vm_create(JavaVMInitArgs *vm_args)
 
                        boot_class_path = properties_get("sun.boot.class.path");
 
-                       MFREE(boot_class_path, char, len);
-
                        p = MNEW(char, strlen(opt_arg) + strlen("0"));
 
                        strcpy(p, opt_arg);
 
-#if defined(ENABLE_JAVASE)
                        properties_add("sun.boot.class.path", p);
                        properties_add("java.boot.class.path", p);
-#endif
+
+                       MFREE(boot_class_path, char, strlen(boot_class_path));
                        break;
 
                case OPT_BOOTCLASSPATH_A:
@@ -930,10 +940,8 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        strcat(p, ":");
                        strcat(p, opt_arg);
 
-#if defined(ENABLE_JAVASE)
                        properties_add("sun.boot.class.path", p);
                        properties_add("java.boot.class.path", p);
-#endif
                        break;
 
                case OPT_BOOTCLASSPATH_P:
@@ -949,12 +957,10 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        strcat(p, ":");
                        strcat(p, boot_class_path);
 
-                       MFREE(boot_class_path, char, len);
-
-#if defined(ENABLE_JAVASE)
                        properties_add("sun.boot.class.path", p);
                        properties_add("java.boot.class.path", p);
-#endif
+
+                       MFREE(boot_class_path, char, len);
                        break;
 
                case OPT_BOOTCLASSPATH_C:
@@ -963,8 +969,6 @@ bool vm_create(JavaVMInitArgs *vm_args)
 
                        boot_class_path = properties_get("sun.boot.class.path");
 
-                       MFREE(boot_class_path, char, strlen(boot_class_path));
-
                        len =
                                strlen(CACAO_VM_ZIP) +
                                strlen(":") +
@@ -977,10 +981,10 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        strcat(p, ":");
                        strcat(p, opt_arg);
 
-#if defined(ENABLE_JAVASE)
                        properties_add("sun.boot.class.path", p);
                        properties_add("java.boot.class.path", p);
-#endif
+
+                       MFREE(boot_class_path, char, strlen(boot_class_path));
                        break;
 
 #if defined(ENABLE_JVMTI)