0

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?

1
  • Of course, different JDK but it's not always used, so the latest is better and secure.
    – Roman C
    Oct 23, 2012 at 18:27

1 Answer 1

3

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 (i.e. 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).

2
  • 1
    It might be needed to resort to the binary package from the Java page instead of using the Ubuntu repositories. (I actually prefer to do it that way.)
    – madth3
    Oct 23, 2012 at 18:45
  • Yeah, that's what I was thinking. (I've been installing my own JDKs for so long I forgot they're in the repo's). But I think you're right, most package managers won't let you have conflicting versions of packages installed. Oct 23, 2012 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy