| Author |
Upgrading from 1.4.2 to 1.5. Path problems(xp)
|
Joseph Warren
Greenhorn
Joined: Mar 11, 2005
Posts: 4
|
|
Greetings everyone! I'm a new Java student, taking lessons from the University of Phoenix, and reading Head First Java, and I'm having a blast! I originally downloaded 1.4.2 to work with in notepad, and soon downloaded JGrasp as an editor. This worked fine, until somebody in my class mentioned that I should get version 1.5. Upgrading JGrasp seemed to work O.K., it compiles, and runs my simple programs with no problems whatsoever, but when I go back to the command line, I have problems. Namely, it seems stuck on 1.4.2 for some reason. When I type "java -version" it came up as 1.4.2.even though I had set my "path" in windows xp to point to the new folder where the 1.5 bin was. I went and deleted all of the 1.4.2 folders, and now I get the following when I type "java -version" I get the following. Error: could not open `C:\Program Files\Java\j2re1.4.2_05\lib\i386\jvm.cfg' Why would it still be looking in the 1.4.2 folder, when I've changed the path to the 1.5 folder. Is there something I'm not getting? Thanks in advance, I have tons to learn! Joseph Warren
|
 |
miguel lisboa
Ranch Hand
Joined: Feb 08, 2004
Posts: 1281
|
|
|
you'r sure you deleted all PATH and JAVA_HOME environment variables?
|
java amateur
|
 |
Joseph Warren
Greenhorn
Joined: Mar 11, 2005
Posts: 4
|
|
I modified the path variable in the "system\advanced" area in XP from the 1.4.2 directory, to the 1. directory. I don't know anything about the JAVA_HOME. Where do I find that?
|
 |
Saket Barve
Ranch Hand
Joined: Dec 19, 2002
Posts: 224
|
|
Joseph, You can define JAVA_HOME as your environment variable. It is useful when you run batch scripts or ant or some other tool. It is not a must. For your current problem, I think you need to modify the CLASSPATH to make the transfer to 1.5 complete. Regards, Saket
|
 |
miguel lisboa
Ranch Hand
Joined: Feb 08, 2004
Posts: 1281
|
|
JAVA_HOME is the path to your jdk you can set it from command line: set JAVA_HOME=C:\...\jdk1.5.0_02 or, in env vars, create a new environment variable called JAVA_HOME and set its value to whatever path you have to your sdk
|
 |
Joseph Warren
Greenhorn
Joined: Mar 11, 2005
Posts: 4
|
|
|
Many, Many thanks to everyone. I'll be trying these out as soon as I can get back to my notebook!
|
 |
Nicholas Carrier
Ranch Hand
Joined: Apr 14, 2005
Posts: 78
|
|
Did, you uninstall version 1.4. When I said uninstall, I meant uninstall it using the Add/Remove programs, rather than just deleting all the files. I believe this will give you a cleaner uninstall/reinstall on your system. Also, make sure you still don't have the path to 1.4 in you system evirnoment variables, because I'm sure having two paths for the same command would cause windows some problems. [ April 15, 2005: Message edited by: Nicholas Carrier ]
|
Teaching yourself anything is always the cheapest way, but it definitely takes a lot of time and effort.<br /> <br />Thank you javaranch <a href="http://"http://faq.javaranch.com/view?HowToAskQuestionsOnJavaRanch"" target="_blank" rel="nofollow">Learn How to Ask Your Question</a> and be nice
|
 |
Joseph Warren
Greenhorn
Joined: Mar 11, 2005
Posts: 4
|
|
Yay!! The uninstall was the bit that did it. I didn't remove the program, using the "add and remove program" so no matter what the path was set at, it was trying to compile and run with 1.4.2. Once I got that done, the path let the 1.5 do it's thing. C:\>java -version java version "1.5.0_02" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09) Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing) Thanks again!! I'm really looking forward to playing with Java, and learning from all of the people here. Joseph Warren (one very appreciative Java newbie)
|
 |
 |
|
|
subject: Upgrading from 1.4.2 to 1.5. Path problems(xp)
|
|
|