java lang exception error
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
java lang exception error
java.lang.NoClassDefFoundError: D:\Program Files\java\Java\Assignment 1\Stack/java
Exception in thread "main"
Tool completed with exit code 1
my program compiles on ctrl+1, but it won't execute, and i'm given the error above....
please help out
Exception in thread "main"
Tool completed with exit code 1
my program compiles on ctrl+1, but it won't execute, and i'm given the error above....
please help out
sake
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
Add the "." as a seperate entry in your classpath, like:
"c:\someotherpath\andmorepath\;."
Where do I go to modify my classpath?
What's your operating system?
For WinXP you can right click on My Computer, select "Properties",
select the "Advanced" tab, click "Environment Variables", under "System
variables" look for "classpath", create one if it does not exist, if that's
the case all it contains is the ".".
"c:\someotherpath\andmorepath\;."
Where do I go to modify my classpath?
What's your operating system?
For WinXP you can right click on My Computer, select "Properties",
select the "Advanced" tab, click "Environment Variables", under "System
variables" look for "classpath", create one if it does not exist, if that's
the case all it contains is the ".".
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
Looks right to me sake, you could try putting the "." at the start of
your classpath since some users have problems with a space in
their classpath (or look for a Java install in for example "C:\j2sdk1.4.2_03\bin"
and change your classpath accordingly)
If this does not resolve your problem take a look at the Java FAQ
your classpath since some users have problems with a space in
their classpath (or look for a Java install in for example "C:\j2sdk1.4.2_03\bin"
and change your classpath accordingly)
If this does not resolve your problem take a look at the Java FAQ
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be
Ok, I just installed J2EE 1.4 SDK
I installed in a new directory. D:\Java\
I have my system variable classpath set to > classpath
and the variable value > D:\Java\jdk\bin\;.
I'm still getting the error below.
This is copy paste from Textpad.
java.lang.NoClassDefFoundError: D:\Java\Stack/java
Exception in thread "main"
Tool completed with exit code 1
I have my system variable classpath set to > classpath
and the variable value > D:\Java\jdk\bin\;.
I'm still getting the error below.
This is copy paste from Textpad.
java.lang.NoClassDefFoundError: D:\Java\Stack/java
Exception in thread "main"
Tool completed with exit code 1
sake
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
-
- Posts: 1
- Joined: Fri Feb 06, 2004 3:29 pm
Same java.lang.NoClassDefFoundError error, but have Win98 SE
Hello,
I've got the exact same problem that is outlined here. I can code and compile, but running the Java application leads to the 'Exception in thread "Main" java.lang.NoClassDefFoundError' message. However, I have Windows 98SE, and I'm not sure where to find the 'classpath' that's been mentioned for the WinXP fix. I tried modifying the Path in the Autoexec.bat file, but that didn't help. Any ideas? Thanks.
Frank
I've got the exact same problem that is outlined here. I can code and compile, but running the Java application leads to the 'Exception in thread "Main" java.lang.NoClassDefFoundError' message. However, I have Windows 98SE, and I'm not sure where to find the 'classpath' that's been mentioned for the WinXP fix. I tried modifying the Path in the Autoexec.bat file, but that didn't help. Any ideas? Thanks.
Frank
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
different error now
I reinstalled Java again this version > Java 2 SDK SE 1.4.2
I reinstalled textpad again ( the newer version ) and I edited the classpath.
This is the error message that I'm getting right now when i hit CTRL+1.
http://www.sakexxx.com/screen.JPG
This is what i set Compile Java to
http://www.sakexxx.com/1.JPG
This is what i set on Run Java Application
http://www.sakexxx.com/2.JPG
This is what i set on Run Java Applet
http://www.sakexxx.com/3.JPG
This is what my classpath variables look like.
http://www.sakexxx.com/classpath.JPG
^^ in the class path you can see the directory that Java was installed into.
Thanks for all your help.
I reinstalled textpad again ( the newer version ) and I edited the classpath.
This is the error message that I'm getting right now when i hit CTRL+1.
http://www.sakexxx.com/screen.JPG
This is what i set Compile Java to
http://www.sakexxx.com/1.JPG
This is what i set on Run Java Application
http://www.sakexxx.com/2.JPG
This is what i set on Run Java Applet
http://www.sakexxx.com/3.JPG
This is what my classpath variables look like.
http://www.sakexxx.com/classpath.JPG
^^ in the class path you can see the directory that Java was installed into.
Thanks for all your help.
sake
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
sake, you're missing a semicolon in your classpath, it should read
D:\Java\jdk\bin\;.
or just
D:\Java\jdk\bin;.
HTH
Edit: I double checked my TP tools settings for Java and they all look like yours.
D:\Java\jdk\bin\;.
or just
D:\Java\jdk\bin;.
HTH
Edit: I double checked my TP tools settings for Java and they all look like yours.
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
Hmm, did you try adding D:\Java\jdk\bin to your path variable?
According to the error message your javac.exe is running from the
system32 folder under windows. I don't think you need D:\Java\jdk\bin
in your classpath. The classpath is used to locate .jar, .zip or .class files,
not the executables such as java.exe and javac.exe. HTH
According to the error message your javac.exe is running from the
system32 folder under windows. I don't think you need D:\Java\jdk\bin
in your classpath. The classpath is used to locate .jar, .zip or .class files,
not the executables such as java.exe and javac.exe. HTH
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be