• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two JDK on a machine

 
zelynn goay
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi. we have an old application that is developed using jdk1.3 and we would like to develop new application using jdk1.4.2
is it possible to have two JDK on the same machine? May I know how to set the environment variables?

thank you.
 
Norm Radder
Bartender
Posts: 1239
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing you can do when compiling a program is set the classpath to the rt.jar for the SDK that you want to use.
Another is to use the javac.exe options -source and -target to control release levels. Then I think you'd only need one SDK.
 
zelynn goay
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi. thanks for your reply. however, i am still unsure how to do it. May i know how to use the javac -source -target option to control release levels?

thanks.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May i know how to use the javac -source -target option to control release levels?

Yes, you may - if you examine the tooldocs section of the Java documentation you will find all of the command line parameters neatly laid out.
Java documentation is currently downloadable from this page. Or - you can browse it online.
Bill
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I keep multiple versions around for similar reasons. My primary project must be WSAD on 1.3, and I play with the latest Eclipse and JDK. I ignore whatever registry entries and environment variables the installation sets and manually set everything I need as I start things up.
 
Marilyn de Queiroz
Sheriff
Posts: 9066
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or you can use a bat file.
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Marilyn de Queiroz:
Or you can use a bat file.


Or a shell script if your aren't using Windows

Layne
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic