| Author |
Installing jdk 1.6 as well as 1.4.2 - possible ?
|
Edward Kin
Greenhorn
Joined: Dec 09, 2008
Posts: 18
|
|
Just a quick question on installing multiple jdk's. We run 1.4.2 at work but am keen to study for the SCJP exam and would like to be able to run 1.6 too.
I was going to download jdk-6u17-windows-i586.exe and then choose a directory to install it to and then create a new project in eclipse and select the jdk that I want (1.6).
Is this ok or will it foul up work settings ?!
Thanks,
Ed
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32688
|
|
You need to set the version you are using first in your PATH variable. There is a way to set the PATH for the lifetime of your terminal window/command prompt, which is something like
export PATH=/usr/java/jdk1.4.2_12/bin/:$PATH
on Unix/Linux, or
set path=c:\Program Files\Java\jdk1.4.2_12\bin;%path%
or something rather similar on Windows. By doing so you can put your 1.4 or your Java6 installations first in the PATH and use them in turn.
I am sure somebody will know the correct syntax to use for windows and correct what I have written. Or you can search; there are lots of similar installation questions here on beginning Java.
|
 |
Edward Kin
Greenhorn
Joined: Dec 09, 2008
Posts: 18
|
|
Thanks for the reply - have worked it out now - pretty straightforward but wanted to be a bit cautious.
Downloaded the sdk for 6 and the documentation (not sure why it's separate) and then can just reference it through the cmd line (windows as outlined above - just setting the path for the session) or I can use eclipse by creating a new project and selecting the jre/compliance level in the project properties.
Thanks again - Ed
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32688
|
|
|
Well done getting it working. The documentation is intended to be used online, so most of us don't download it.
|
 |
 |
|
|
subject: Installing jdk 1.6 as well as 1.4.2 - possible ?
|
|
|