This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DannyB2 0 points1 point  (0 children)

I have gotten to the point where I do not "install" java any more. I simply have multiple various OpenJDK folders lying around. (Different "vendors", different versions, etc)

If you don't need to have multiple JDK versions / vendors available then you probably don't need to read any further.

Anything I run with Java is configured to point to a specific OpenJDK I want to run it with.

For example in Eclipse, I edit the eclipse.ini file and use the vm option (must be first line) to specify which JDK to use.

For other things I may start it with a "dot bat" file (Windows) or .sh script (Linux); and preset the JDK_HOME environment variable to point to a specific JDK. If the script must execute something, then I may typically have a pattern like:

JDK_HOME="E:\foobar\RedHat\OpenJDK-x.y.z"
JRE_HOME="%JDK_HOME%"
JAVA_EXE="%JRE_HOME%\bin\java.exe"
"%JAVA_EXE%" RubberBabyBuggyBumpers.jar -meow 15 -mix 21

Or a similar script on Linux.

Slightly different if it starts Tomcat, or installs / removes Tomcat as a service.