This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have to jdk installed 1.4.2_09 and 1.5.0_05. I set up all of my environment variables to to the 1.4 version because I want to use this one, but it keeps showing me the 1.5 version when I run 'java -version'.
I would like my system not to see the 1.5 version, but also I don't want to uninstall it.
With all environment variables set to 1.4, where can I actually make the settings so 'java -version' let's me know I'm using 1.4? Is it registry entries?
I'm doing some testing involving Tomcat, Maven, and MySql. (Tomcat is set to use 1.4 using the compatibility patch.
perhaps if you modify your path variable to point to the right %JAVA_HOME%\bin then it would display the right version? Also, maybe two versions are registered in your path variable that triggers this conflict...
I gess you are using Windows, right? Where is you executing the "java -version" command? In the "cmd.exe" or "command.exe"? Type "set" in the command line and look at the "PATH" variable, check if you jdk1.4 bin path is there.
Joined: Nov 20, 2003
I am using Windows XP Professional.
Yes my path is the C:\j2sdk1.4.2_09\bin and no other java paths are set.
Thats a good test, but do you have another suggestion? [ October 20, 2005: Message edited by: Jimmy Die ]
Did you restart the computer after changing the environment variables? Sometimes this is necessary in Windows.
But...why do you want to use Java 1.4? The Java 1.5 compiler can compile to 1.4 byte code if you use the -target 1.4 command line option. Also, Java 1.5 can run 1.4 byte code. It seems to me that you don't need to have Java 1.4 installed for most situations.
I'm running software platform called Sakai (for higher education). It runs on tomcat.
Maven is used to build and re-build the platform from src. The platform is not ready for 1.5 (believe me I've tried long and hard to make it work) and I must use Maven to recompile, for this I need to have the 1.4 version set and ready for Maven to use it to perform the build...
Normally I would just do as you suggested, but Maven is a little tempermental.
I will say that I've uninstalled the jre1.5 and kept the sdk1.5. When doing this I get the version that I am looking for, but I was hoping not to have to uninstall the jre1.5 to accomplish this.
seems your already have a solution; but I had same issue on old NT box; found a 'java.exe' in the c:\winnt\system32 directory which always ran the 1.5.0_04 JRE. Could have one installed in XP system directory.