Every time I try, it pretends that it has saved the changes, but it really hasn't. If I close the command prompt and open it again, I get the original path. This happened even when I tried overwriting the path rather than appending it. It is almost like something is always rewriting the path, no matter what I do. Needless to say, I can't run any java classes from batch files or the command prompt until this is fixed. Does anyone know what to do here? Thanks.
Announcement
Collapse
No announcement yet.
Help! My computer refuses to amend the java path.
Collapse
X
-
In XP:
System Properties > Advanced > Environment Variables > System > Path > Edit
I recommend doing the actual editing in a text editor because the text box is tiny.
Yes, I do think they made it this difficult to find just to spite Java. This was much, much easier before XP.Blog | Civ2 Scenario League | leo.petr at gmail.com
Comment
-
I haven't counted, but perhaps your path is too long? IIRC, you can only have 128 characters worth of path stored.
You can also change the path in your autoexec with msconfig.(\__/) 07/07/1937 - Never forget
(='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
(")_(") "Starting the fire from within."
Comment
-
Thanks guys. I wiped out a couple of the Oracle paths and it saved the new path. Unfortunately, that did not solve the central problem. While I can run things through an IDE, I still cannot run anything from the command prompt or a batch file. It gives me the same error as before. I made sure that the path is right, and I can't figure out what else it might be.
Comment
-
Maybe you need to set something else in the path?(\__/) 07/07/1937 - Never forget
(='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
(")_(") "Starting the fire from within."
Comment
-
Do you need to specify an extension? Would it assume a ".class" extension if you supply none?(\__/) 07/07/1937 - Never forget
(='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
(")_(") "Starting the fire from within."
Comment
-
Found this on Sun's Java website
Error Explanation
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp
If you receive this error, java cannot find your bytecode file, HelloWorldApp.class.
One of the places java tries to find your bytecode file is your current directory. So, if your bytecode file is in C:\java, you should change your current directory to that. To change your directory, type the following command at the prompt and press Enter:
cd c:\java
The prompt should change to C:\java>. If you enter dir at the prompt, you should see your .java and .class files. Now enter java HelloWorldApp again.
If you still have problems, you might have to change your CLASSPATH variable. To see if this is necessary, try "clobbering" the classpath with the following command:
set CLASSPATH=
Now enter java HelloWorldApp again. If the program works now, you'll have to change your CLASSPATH variable.(\__/) 07/07/1937 - Never forget
(='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
(")_(") "Starting the fire from within."
Comment
-
(\__/) 07/07/1937 - Never forget
(='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
(")_(") "Starting the fire from within."
Comment
-
Oracle
I noticed you had Oracle installed. The Oracle installer changes the Classpath. It thinks that Oracle Java is the version you want to run and overrides whatever is there.“It is no use trying to 'see through' first principles. If you see through everything, then everything is transparent. But a wholly transparent world is an invisible world. To 'see through' all things is the same as not to see.”
― C.S. Lewis, The Abolition of Man
Comment
Comment