01: package org.objectweb.celtix.common.commands;
02:
03: import java.io.File;
04:
05: public final class JavaHelper {
06:
07: private JavaHelper() {
08: //complete
09: }
10:
11: /** Get the command to launch a JVM. Find the java command
12: * relative to the java.home property rather than what is on the
13: * path. It is possible that the java version being used it not
14: * on the path
15: *
16: */
17: public static String getJavaCommand() {
18: String javaHome = System.getProperty("java.home");
19: if (null != javaHome) {
20: return javaHome + File.separator + "bin" + File.separator
21: + "java" + ForkedCommand.EXE_SUFFIX;
22: } else {
23: return "java" + ForkedCommand.EXE_SUFFIX;
24: }
25: }
26: }
|