File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Upgrading from 1.4.2 to 1.5. Path problems(xp)

 
Joseph Warren
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you'r sure you deleted all PATH and JAVA_HOME environment variables?
 
Joseph Warren
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 229
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Joseph Warren
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic