TUM CCSM Commons

edu.tum.cs.commons.io
Class JavaUtils

java.lang.Object
  extended by edu.tum.cs.commons.io.JavaUtils

public class JavaUtils
extends java.lang.Object

This class provides utilities to access a Java runtime execution environment.

Version:
$Rev: 26268 $
Author:
juergens, $Author: juergens $
Rating:
GREEN Hash: 27257F331AC5DF44F35CBC78C15A1E96

Constructor Summary
JavaUtils()
           
 
Method Summary
static java.io.File findJavaExecutable(java.io.File vmInstallLocation)
          Starting in the specified VM install location, attempt to find the 'java' executable file.
static java.io.File obtainJavaExecutable()
          Use findJavaExecutable(File) to search in the directory specified by environment variable JAVA_HOME for the Java executable.
static java.lang.String obtainJavaExecutionCommand()
          Use obtainJavaExecutable() to determine the Java executable via environment variable JAVA_HOME.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaUtils

public JavaUtils()
Method Detail

findJavaExecutable

public static java.io.File findJavaExecutable(java.io.File vmInstallLocation)
Starting in the specified VM install location, attempt to find the 'java' executable file. If found, return the corresponding File object, otherwise return null. This is copied from org.eclipse.jdt.internal.launching.StandardVMType.


obtainJavaExecutable

public static java.io.File obtainJavaExecutable()
Use findJavaExecutable(File) to search in the directory specified by environment variable JAVA_HOME for the Java executable.


obtainJavaExecutionCommand

public static java.lang.String obtainJavaExecutionCommand()
Use obtainJavaExecutable() to determine the Java executable via environment variable JAVA_HOME. If this fails, a command that expects the Java executable to be on the path is returned.


TUM CCSM Commons

TUM CCSM Commons - 2.7