Changeset 5967 in josm
- Timestamp:
- 2013-05-23T00:38:59+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/RestartAction.java
r5951 r5967 18 18 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec; 19 19 import org.openstreetmap.josm.tools.ImageProvider; 20 import org.openstreetmap.josm.tools.PlatformHookWindows; 20 21 import org.openstreetmap.josm.tools.Shortcut; 21 22 … … 49 50 50 51 /** 51 * Determines if restart ting the application should be possible on this platform.52 * Determines if restarting the application should be possible on this platform. 52 53 * @return {@code true} if the mandatory system property {@code sun.java.command} is defined, {@code false} otherwise. 53 54 * @since 5951 … … 65 66 try { 66 67 // java binary 67 final List<String> cmd = new ArrayList<String>(Collections.singleton(System.getProperty("java.home") + "/bin/java")); 68 final String java = System.getProperty("java.home") + File.separator + "bin" + File.separator + 69 (Main.platform instanceof PlatformHookWindows ? "java.exe" : "java"); 70 if (!new File(java).isFile()) { 71 throw new IOException("Unable to find suitable java runtime at "+java); 72 } 73 final List<String> cmd = new ArrayList<String>(Collections.singleton(java)); 68 74 // vm arguments 69 75 for (String arg : ManagementFactory.getRuntimeMXBean().getInputArguments()) { … … 89 95 // finally add program arguments 90 96 cmd.addAll(Arrays.asList(Main.commandLineArgs)); 97 Main.info("Restart "+cmd); 91 98 // execute the command in a shutdown hook, to be sure that all the 92 99 // resources have been disposed before restarting the application
Note:
See TracChangeset
for help on using the changeset viewer.
