Here you can find the source of getJvmExecutablePath()
public static Object getJvmExecutablePath()
//package com.java2s; // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell import java.io.File; public class Main { /**// ww w. ja v a 2 s . co m * Get the path of the JVM executable. * Tries to identify the same JVM executable as the one * that is executing currently. Otherwise, just returns * "java". Note that the full JVM executable path will * (probably) only be found on Linux/Unix for JRE/JDK * installations that use the standard directory layout. * * @return path to JVM executable */ public static Object getJvmExecutablePath() { String javaHome = System.getProperty("java.home"); File jvmExe = new File(javaHome + "/bin/java"); if (jvmExe.exists()) { return jvmExe.getPath(); } return "java"; } }