Index: build/make/harmonyvm.properties =================================================================== --- build/make/harmonyvm.properties (revision 551123) +++ build/make/harmonyvm.properties (working copy) @@ -1,8 +1,5 @@ # This file contains additional options passed to vm by launcher -# Define directory containing DRLVM resources --Dorg.apache.harmony.vm.vmdir=%LAUNCHER_HOME%/%VM_DIR%/ - # These are to help the Eclipse plug-in find the kernel classes info bootclasspath.kernel.1=%LAUNCHER_HOME%/%VM_DIR%/kernel.jar bootclasspath.kernel.source.1=%LAUNCHER_HOME%/%VM_DIR%/kernel-src.jar Index: vm/vmcore/src/init/vm_properties.cpp =================================================================== --- vm/vmcore/src/init/vm_properties.cpp (revision 551123) +++ vm/vmcore/src/init/vm_properties.cpp (working copy) @@ -139,19 +139,7 @@ if (port_executable_name(&launcher_dir, prop_pool) != APR_SUCCESS) { LDIE(13, "Failed to find executable location"); } - // directory for the executable - char *p = strrchr(launcher_dir, PORT_FILE_SEPARATOR); - if (NULL == p) - LDIE(14, "Failed to determine executable parent directory"); - *p = '\0'; - // home directory - char* home_path = apr_pstrdup(prop_pool, launcher_dir); - p = strrchr(home_path, PORT_FILE_SEPARATOR); - if (NULL == p) - LDIE(15, "Failed to determine java home directory"); - *p = '\0'; - properties.set_new("java.home", home_path); properties.set_new("java.vm.specification.version", "1.0"); properties.set_new("java.vm.specification.vendor", "Sun Microsystems Inc."); properties.set_new("java.vm.specification.name", "Java Virtual Machine Specification"); @@ -184,9 +172,22 @@ char* vm_dir = properties.get(O_A_H_VM_VMDIR); - char* lib_path = apr_pstrcat(prop_pool, launcher_dir, - PORT_PATH_SEPARATOR_STR, vm_dir, NULL); + // home directory + char* home_path = apr_pstrdup(prop_pool, vm_dir); + char* p = strrchr(home_path, PORT_FILE_SEPARATOR); + if (NULL == p) + LDIE(15, "Failed to determine java home directory"); + *p = '\0'; + char* lib_path = apr_pstrcat(prop_pool, vm_dir, + PORT_PATH_SEPARATOR_STR, home_path, NULL); + + p = strrchr(home_path, PORT_FILE_SEPARATOR); + if (NULL == p) + LDIE(15, "Failed to determine java home directory"); + *p = '\0'; + properties.set_new("java.home", home_path); + properties.destroy(vm_dir); vm_dir = NULL;