简体   繁体   中英

How to install multiple versions of JDK without destroying current settings?

I'm on an Ubuntu Desktop that is set up with JDK 1.6.34 and everything works great. I'd like to install JDK 1.5.11 in such a way that my environmental variables, etc. don't get "blown out" by the installation of 1.5.11.

Is this even possible? Can the same machine have 2+ JDKs installed on it? If so, what are the necessary steps one needs to take to achieve this?

Yes, you can install as many JDK's on a machine as you want. As for "blowing out" environment variables, this is how you control which jdk you'll use (ie make sure the desired jdk's /bin directory is first in the path and that JAVA_HOME points to the JDK you want to be using).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM