aspose file tools*
The moose likes Beginning Java and the fly likes Installing jdk 1.6 as well as 1.4.2 - possible ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Installing jdk 1.6 as well as 1.4.2 - possible ?" Watch "Installing jdk 1.6 as well as 1.4.2 - possible ?" New topic
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: 38873
    
  23
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: 38873
    
  23
Well done getting it working. The documentation is intended to be used online, so most of us don't download it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Installing jdk 1.6 as well as 1.4.2 - possible ?