org.apache.tools.ant.util
public final class JavaEnvUtils extends Object
Since: Ant 1.5
Field Summary | |
---|---|
static String | JAVA_1_0 Version constant for Java 1.0 |
static String | JAVA_1_1 Version constant for Java 1.1 |
static String | JAVA_1_2 Version constant for Java 1.2 |
static String | JAVA_1_3 Version constant for Java 1.3 |
static String | JAVA_1_4 Version constant for Java 1.4 |
static String | JAVA_1_5 Version constant for Java 1.5 |
Method Summary | |
---|---|
static String | getJavaVersion()
Returns the version of Java this class is running under. |
static String | getJdkExecutable(String command)
Finds an executable that is part of a JDK installation based on
the java.home system property.
|
static String | getJreExecutable(String command)
Finds an executable that is part of a JRE installation based on
the java.home system property.
|
static Vector | getJrePackages()
get a vector of strings of packages built into
that platforms runtime jar(s) |
static Vector | getJrePackageTestCases()
Testing helper method; kept here for unification of changes. |
static boolean | isJavaVersion(String version)
Compares the current Java version to the passed in String -
assumes the argument is one of the constants defined in this
class. |
static boolean | isKaffe()
Checks whether the current Java VM is Kaffe. |
Returns: the version of Java as a String, e.g. "1.1"
You typically find them in JAVA_HOME/bin
if
JAVA_HOME
points to your JDK installation.
Parameters: command the java executable to find.
Returns: the path to the command.
Since: Ant 1.5
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.
Parameters: command the java executable to find.
Returns: the path to the command.
Since: Ant 1.5
Returns: list of packages.
Returns: a list of test classes depending on the java version.
Parameters: version the version to check against the current version.
Returns: true if the version of Java is the same as the given version.
Since: Ant 1.5
Returns: true if the current Java VM is Kaffe.
Since: Ant 1.6.3
See Also: http://www.kaffe.org/