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 earier had JDK 1.4.2 and now using JDK 1.5.0 . But somehow I do not know that javac is running with JDK 1.5.0 version compiler and java is running with JDK 1.4.2 java.exe. How can I tell the java.exe file to use JDK 1.5.0 java.exe file???
Here is something I observed....
[ January 03, 2006: Message edited by: Raghavan Chockalingam ]
[ January 03, 2006: Message edited by: Raghavan Chockalingam ] [ January 04, 2006: Message edited by: Raghavan Chockalingam ]
You can use "java -version" at the command prompt to give you the version of java you are using.
Joined: Dec 30, 2005
I am sorry for not completing my reply and it was submitted.
You could be having problems with PATH and CLASSPATH environment variables. The probable reason could be that you have appended the new path to java 1.5 but did not delete the prior path entry. So it always finds 1.4 first.
Joined: Dec 20, 2005
I have already ran the command and the result is in the first post...pls look out for different versions reported by JVM...
if you're running java under a windows environment, do the following:
click the start button, select 'run', hen type regedit and hit enter. This will launch the regedit program.
Browse through the keys till you find the key HKEY_LOCAL_MACHINE/Software/Javasoft/Java Development Kit. Select this key in the left hand pane. In the right hand pane, ensure that CurrentVersion is set to 1.5. Also, check that you have a 1.5 key under the currently selected key in the tree.
Then, select the Java Runtime Environment key. Check this is also set to 1.5
What I suspect happened is that you installed the 1.4.x Development Kit, then installed the 1.5 Runtime Environment. From what I recall, javac runs from the development kit, and java runs from the Runtime environment by default
*shrugs* hope this helps.
McFinnigan? Never heard of him. Nobody here but us chickens...<br /> <br />SCJP for Java 1.4<br />SCJD for Java 5.0
Joined: Dec 20, 2005
You are right...registry had full or 1.4.2 entries...I tried to replace them with 1.5.0 but did not work so I deleted all those 1.4.2 entries and installed jdk1.5.0 again now the registry has only 1.5.0 entries...
but I believe there is some problem lurking...cos when i try to run this program...it gives up this error...why is this error comin up..
Hi you can set it in the envirement variables which can be accessed from my computer -> propreties -> advanced -> envirement variables, edit the path variable and add: <location where jdk 1.5 is installed> / bin ; add it at the beginning of the path variable. Omar
Hi Raghavan, If I were you I would invest the time in learning how to build and run your classes with ANT. Another tip would be to write unit tests for your classes and have ANT run the unit tests for you, so as to ensure that you logic is correct.