Changeset 6234 in josm
- Timestamp:
- 2013-09-18T23:02:11+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/RestartAction.java
r6125 r6234 91 91 // program main and program arguments (be careful a sun property. might not be supported by all JVM) 92 92 String[] mainCommand = System.getProperty("sun.java.command").split(" "); 93 // look for a .jar in all chunks to support paths with spaces (fix #9077) 94 String jarPath = mainCommand[0]; 95 for (int i = 1; i < mainCommand.length && !jarPath.endsWith(".jar"); i++) { 96 jarPath += " " + mainCommand[i]; 97 } 93 98 // program main is a jar 94 if ( mainCommand[0].endsWith(".jar")) {99 if (jarPath.endsWith(".jar")) { 95 100 // if it's a jar, add -jar mainJar 96 101 cmd.add("-jar"); 97 cmd.add(new File( mainCommand[0]).getPath());102 cmd.add(new File(jarPath).getPath()); 98 103 } else { 99 104 // else it's a .class, add the classpath and mainClass
Note:
See TracChangeset
for help on using the changeset viewer.