Results 1 to 4 of 4
Thread: java.lang.NoClassDefFoundError:
- 03-12-2009, 04:53 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 4
- Rep Power
- 0
java.lang.NoClassDefFoundError:
So I have Vista, 64 bit OS,
I am using JCreator,
I get the error:
java.lang.NoClassDefFoundError:
I was suggested the following:
Likely Cause:
The most likely cause is that you have the CLASSPATH environment variable set.
The CLASSPATH environment variable, which is optional, has a list of one or more directories in which the Java runtime
looks for your ".class" file.
If the CLASSPATH environment variable is not set, the Java runtime looks for your ".class" file in the current
directory, which is what you want.
----
How can I get rid of the CLASSPATH environment variable?
1) Right click the "My Computer" icon and select "Properties";
2) On the "System Properties" dialog box, click the "Advanced" tab;
3) On the "Advanced" tab, click the "Environment Variables" button;
4) Scroll through the "User Variables for..." listbox and look for an entry for CLASSPATH. If you find one, select it
and click the "Delete" button;
5) Scroll through the "System variables" listbox and look for an entry for CLASSPATH. If you find one, select it and
click the "Delete" button;
6) On the "Environment Variables" dialog box, click the "OK" button;
7) On the "System Properties" dialog box, click the "OK" button;
----
How can I verify that the CLASSPATH environment variable has been deleted?
1) Click the "start" button on the Windows taskbar;
2) Select "Run...";
3) In the "Run" dialog box, enter "CMD" in the Open listbox, then click the "OK" button;
4) In the command-line window, type: set CLASSPATH
5) Press ENTER, which should display: Environment variable CLASSPATH not defined
----
So in Vista I do the above instructions and I go to and I get the desired:
Environment variable CLASSPATH not defined
So its not a VISTA 64 thing?
the other thing I think it might be is I just went to Jcreator and hit NEW and then JAVA file, I do not have a seperate .class file,
how do I make the appriate .class file out of the .java file if that is the case.
Thanks, I appreciate any help, I am very new to this and am trying to do an online class by myself.
If its not an OS problem, or a missing .class file, I will post the code, but since its an online class, I am trying to avoid putting my work online unless neccessary
-Beginner
- 03-12-2009, 05:03 AM #2
Member
- Join Date
- Mar 2009
- Posts
- 4
- Rep Power
- 0
to clarify, the file is named
Ch02Program.java
After I hit RUN,
I get :
Build Output-
--------------------Configuration: <Default>--------------------
C:\Users\Desktop\CH02\Ch02Program.java:34: ';' expected
averageOfIntegers = (sumOfIntegers / 3) // A-12
^
C:\Users\Desktop\CH02\Ch02Program.java:42: ';' expected
maximumInteger = firstInteger // A-21
^
2 errors
Process completed.
General Output-
--------------------Configuration: <Default>--------------------
java.lang.NoClassDefFoundError: task_04_02_ch02
Exception in thread "main"
Process completed.
- 03-12-2009, 05:06 AM #3
Member
- Join Date
- Mar 2009
- Posts
- 4
- Rep Power
- 0
A-12 and A-21 seem to be the problem lines of code?
its hard to know if its something stupid like incorrect spacing or such when all's I have is a textbook to learn from.
- 03-13-2009, 11:58 AM #4
Member
- Join Date
- Mar 2009
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
java.lang.NoClassDefFoundError
By noobie in forum Java AppletsReplies: 5Last Post: 04-22-2009, 02:35 AM -
java.lang.NoClassDefFoundError: com.ibm.ws.orb.GlobalORBFactory
By hawkeye in forum Enterprise JavaBeans (EJB)Replies: 1Last Post: 06-16-2008, 10:56 AM -
java.lang.NoClassDefFoundError
By bizmut in forum EclipseReplies: 3Last Post: 06-15-2008, 12:54 AM -
java.lang.NoClassDefFoundError
By J_a_y in forum New To JavaReplies: 2Last Post: 08-07-2007, 11:51 AM -
java.lang.NoClassDefFoundError
By fred in forum Advanced JavaReplies: 3Last Post: 08-01-2007, 05:00 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks