@ Pure public static String getVMBinary ( ) { final String javaHome = System . getProperty ( "java.home" ) ; //$NON-NLS-1$ final File binDir = new File ( new File ( javaHome ) , "bin" ) ; //$NON-NLS-1$ if ( binDir . isDirectory ( ) ) { File exec = new File ( binDir , getExecutableFilename ( "javaw" ) ) ; //$NON-NLS-1$ if ( exec . isFile ( ) ) { return exec . getAbsolutePath ( ) ; } exec = new File ( binDir , getExecutableFilename ( "java" ) ) ; //$NON-NLS-1$ if ( exec . isFile ( ) ) { return exec . getAbsolutePath ( ) ; } } return null ; }
Replies the current java VM binary .