Search code examples
javalinuxbugzilla

Configuring multiple java on linux


I have a linux vm which is our testing machine. as part of some initiative, I want to install some software on this vm which would require Java 6+. Currently its running java 5 which i don't want to change because of the compatibility with test environment.

I want to know who can i configure multiple JAVA on this vm.


Solution

  • By installing the binaries to another location, and then directily referencing the file you can start using a specific binary

    Instead of

    java -jar Derp.jar

    it will be

    /opt/java5/bin/java -jar Derp.jar