Fork me on GitHub

Java Boot Classpath Detector

The Java Boot Classpath Detector is an executable jar file which tries to determine the boot classpath of the Java Runtime and outputs that classpath to the standard output.

It is used by the Animal Sniffer Maven Plugin to autodetect the boot classpath of Java Runtimes.

It is known to work with most Java versions 1.2 or newer from most vendors.

Usage

Just execute the jar file, e.g.

java -jar java-boot-classpath-detector-1.16.jar

If successful the process should return with exit code 0 and the output should be the boot classpath as a single line with each element separated by File.pathSeparatorChar. For example, on linux you might get output like:

/home/user/bin/jdk1.6.0_16/jre/lib/resources.jar:/home/user/bin/jdk1.6.0_16/jre/lib/rt.jar:/home/user/bin/jdk1.6.0_16/jre/lib/sunrsasign.jar:/home/user/bin/jdk1.6.0_16/jre/lib/jsse.jar:/home/user/bin/jdk1.6.0_16/jre/lib/jce.jar:/home/user/bin/jdk1.6.0_16/jre/lib/charsets.jar:/home/user/bin/jdk1.6.0_16/jre/classes

A non-zero exit code indicates that the boot classpath could not be reliably determined.