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
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.
Joined: Dec 09, 2008
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
Joined: Oct 13, 2005
Well done getting it working. The documentation is intended to be used online, so most of us don't download it.