Java examples for File Path IO:File Operation
get JVM Executable File
//package com.java2s; import java.io.File; public class Main { public static void main(String[] argv) throws Exception { boolean w = true; System.out.println(getJVMExecutableFile(w)); }/* w ww . ja v a 2 s . c o m*/ public static final File getJVMExecutableFile(boolean w) { String javaHome = System.getProperty("java.home"); File f = new File(javaHome); f = new File(f, "bin"); f = new File(f, w ? "javaw.exe" : "java.exe"); return f; } }