• Post Reply Bookmark Topic Watch Topic
  • New Topic

Having 1.4 and 1.5 on the same machine??  RSS feed

 
Author
Ranch Hand
Posts: 133
10
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure this is the correct forum for this question...
Does anyone have Java 1.4 and the Alpha release of Java 1.5 both installed
on the same Windows computer? If I remember correctly, I had trouble with
a registry setting when I tried to run both Java 1.3 and 1.4 on the same
computer two years ago.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Barry!
How goes things since JavaOne?
Concerning your question, see following post. Original suggestion removed as it introduced problems.
[ February 08, 2004: Message edited by: Dirk Schreckmann ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's how I have things working.
First, I'll mention that my CLASSPATH is set simply to the current working directory, represented with a period. rt.jar should not be in the CLASSPATH. Some folks seem to add if for some reason. Don't.
My regular JAVA_HOME environment variable is set to %JAVA14_HOME% (see below). My regular PATH setting begins with %JAVA_HOME%\bin;AND_THE_REST...
Then, I've set up environment variables to hold values to be able to switch between Java 1.5 and Java 1.4 for compiling and running things from a command prompt. These variables are:
  • JAVA14_HOME which is set to my Java 2 1.4.2_03 SDK installation
  • JAVA14_PATH which is similar to the regular PATH but it starts with %JAVA14_HOME%\bin;AND_THE_REST...
  • JAVA15_HOME which is set to the location of my Java 2 1.5 Beta SDK installation
  • JAVA15_PATH which is similar to JAVA14_PATH except it begins with %JAVA15_HOME%\bin;AND_THE_REST...
  • Then I've two batch files located in a directory in my PATH setting. java15.bat uses the above described extra environment variables to set up the environment for using Java 1.5, and java14.bat works similarly to set the environment for using Java 1.4. Following are the contents of those two files.
    java15.batjava14.batI'm liking this setup as changing environments at the command prompt is quick and easy. Also, when Sun puts out new editions of Java 1.5 or Java 1.4, I need only run through their installations and edit either the JAVA15_HOME or JAVA14_HOME environment variable as appropriate and everything else should work just fine.
    [ February 08, 2004: Message edited by: Dirk Schreckmann ]
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!