Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Installing jdk 1.6 as well as 1.4.2 - possible ?  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 60098
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 60098
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done getting it working. The documentation is intended to be used online, so most of us don't download it.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!