You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2007/08/09 08:40:53 UTC
svn commit: r564114 - in /harmony/enhanced/drlvm/trunk:
build/make/harmonyvm.properties vm/vmcore/src/init/vm_properties.cpp
Author: gshimansky
Date: Wed Aug 8 23:40:53 2007
New Revision: 564114
URL: http://svn.apache.org/viewvc?view=rev&rev=564114
Log:
Applied patch from HARMONY-4038
[drlvm][init] Assertion when launching vm with basic launcher
Modified:
harmony/enhanced/drlvm/trunk/build/make/harmonyvm.properties
harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp
Modified: harmony/enhanced/drlvm/trunk/build/make/harmonyvm.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/harmonyvm.properties?view=diff&rev=564114&r1=564113&r2=564114
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/harmonyvm.properties (original)
+++ harmony/enhanced/drlvm/trunk/build/make/harmonyvm.properties Wed Aug 8 23:40:53 2007
@@ -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
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp?view=diff&rev=564114&r1=564113&r2=564114
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp Wed Aug 8 23:40:53 2007
@@ -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");
@@ -186,8 +174,21 @@
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;