Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Java 2 problems  (Read 7631 times)

0 Members and 1 Guest are viewing this topic.

Barkleyc

  • Guest
Java 2 problems
« on: October 23, 2004, 02:39:44 PM »
I have been working with the SAMS Java 2 in 24 Hours book and was doing fine up to chapter 7 when I had to reformat my hard drive. Since then I have re downloaded and reinstalled the j2sdk kit in the form of the j2ee1.4sdk package. I have set my classpath correctly (have scrutinized this carefully) When I run the command line from the java folder and enter any "java" command it responds with "JAVA is not a recognized command, program or batch file"
I'm running Windows XP Home.
Can anyone help here?
thanks,
Barkley

Joleen

  • Guest
Re: Java 2 problems
« Reply #1 on: October 25, 2004, 06:00:05 AM »
Have you tried to reinstall the Java package?

SKy

  • Guest
Re: Java 2 problems
« Reply #2 on: October 25, 2004, 11:15:00 AM »
Hi Barkleyc,

Most likely your computer's class path is not set correctly.

Type java -version at c prompt and if you get a java version messge, it means u have installed java and likely you have not set the class path correctly. Read through your book or website on how to set the class path in WinXp. I think it's in control panel, system, Advance, environment.

Cheers

Barkleyc

  • Guest
Re: Java 2 problems
« Reply #3 on: October 26, 2004, 12:02:06 PM »
Thank you for the response to the two above. It seems as if you didn't read my initial post very well. The questions you asked were addressed initially. The Class Path is set to .;C:\j2sdk1\lib\tools.jar as the book indicates and was what worked before.  I have re-downloaded and re-installed java with no results.
Don't know what to do at this point

shield

  • Guest
Re: Java 2 problems
« Reply #4 on: October 26, 2004, 10:01:43 PM »
...maybe a bad source?? ... permissions for XP user set right? ..... Maybe Java was disabled by mistake?

Barkleyc

  • Guest
Re: Java 2 problems
« Reply #5 on: October 27, 2004, 08:47:47 AM »
Problem solved! I moved tools.jar out of the C:\Sun\AppServer\jsdk\lib where it was to C:\Sun, and changed the Class Path accordingly. (I know that in my above response it appears that the Class Path was set incorrectly but I assure you, it was correct. I checked it at least 8 times.) Everything works fine now. It appears that XP couldn't find it buried that deep. Huh!? Weird.
Barkley