|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.util.JavaEnvUtils
A set of helper methods related to locating executables or checking conditons of a given Java installation.
Field Summary | |
static java.lang.String |
JAVA_1_0
Version constant for Java 1.0 |
static java.lang.String |
JAVA_1_1
Version constant for Java 1.1 |
static java.lang.String |
JAVA_1_2
Version constant for Java 1.2 |
static java.lang.String |
JAVA_1_3
Version constant for Java 1.3 |
static java.lang.String |
JAVA_1_4
Version constant for Java 1.4 |
static java.lang.String |
JAVA_1_5
Version constant for Java 1.5 |
Constructor Summary | |
JavaEnvUtils()
|
Method Summary | |
static java.lang.String |
getJavaVersion()
Returns the version of Java this class is running under. |
static java.lang.String |
getJdkExecutable(java.lang.String command)
Finds an executable that is part of a JDK installation based on the java.home system property. |
static java.lang.String |
getJreExecutable(java.lang.String command)
Finds an executable that is part of a JRE installation based on the java.home system property. |
static java.util.Vector |
getJrePackages()
get a vector of strings of packages built into that platforms runtime jar(s) |
static java.util.Vector |
getJrePackageTestCases()
Testing helper method; kept here for unification of changes. |
static boolean |
isJavaVersion(java.lang.String version)
Compares the current Java version to the passed in String - assumes the argument is one of the constants defined in this class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String JAVA_1_0
public static final java.lang.String JAVA_1_1
public static final java.lang.String JAVA_1_2
public static final java.lang.String JAVA_1_3
public static final java.lang.String JAVA_1_4
public static final java.lang.String JAVA_1_5
Constructor Detail |
public JavaEnvUtils()
Method Detail |
public static java.lang.String getJavaVersion()
public static boolean isJavaVersion(java.lang.String version)
public static java.lang.String getJreExecutable(java.lang.String command)
java
, keytool
,
policytool
, orbd
, rmid
,
rmiregistry
, servertool
and
tnameserv
are JRE executables on Sun based
JRE's.
You typically find them in JAVA_HOME/jre/bin
if
JAVA_HOME
points to your JDK installation. JDK
< 1.2 has them in the same directory as the JDK
executables.
public static java.lang.String getJdkExecutable(java.lang.String command)
You typically find them in JAVA_HOME/bin
if
JAVA_HOME
points to your JDK installation.
public static java.util.Vector getJrePackageTestCases()
public static java.util.Vector getJrePackages()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |