| | |
Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error
![]() |
Hi,
I'm trying to run my program in command prompt, but i get this error:
Can anybody tell me what this error means?
Thanx.
I'm trying to run my program in command prompt, but i get this error:
Java Syntax (Toggle Plain Text)
Exception in thread "main" java.lang.NoClassDefFoundError: Invaders
Thanx.
From the documentation
public class NoClassDefFoundError
extends LinkageError
Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found.
Since:
JDK1.0
See Also:
Serialized Form
public class NoClassDefFoundError
extends LinkageError
Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found.
Since:
JDK1.0
See Also:
Serialized Form
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
No, it's nothing with your code. The class file cannot be found. This is common while using IDE's. The source file is placed in one directory, while the class file somehow ends up in another, and the JVM is looking in the directory that stores the source. Make sure that you have the classfile in the correct directory.
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
It's whatever the JVM and JRE are pointing to. If your using an IDE, which I think you are, then the path should be pointing to the directory were the files are located, but in weird circumstances it's not.
What IDE are you using?
Have you looked at the folder that's "suppose" to cotain these files to make sure they are there?
What IDE are you using?
Have you looked at the folder that's "suppose" to cotain these files to make sure they are there?
•
•
Join Date: May 2005
Posts: 13
Reputation:
Solved Threads: 0
well........the error means the JVM can not
find the class file................
there cud b 2 reasons for that...
1. if the class file is not created at all i.e.
being not compiled successfully.
2.the path is not properly set,i.e. JVM
is not finding the class file where it is looking.......
as u said u ar using borland jbuilder.......
dunno bout jbuilder but generally there wud b a directory option
see thru the options and see where
ur directories options are pointing to
and assign the path where ur class files ar created
find the class file................
there cud b 2 reasons for that...
1. if the class file is not created at all i.e.
being not compiled successfully.
2.the path is not properly set,i.e. JVM
is not finding the class file where it is looking.......
as u said u ar using borland jbuilder.......
dunno bout jbuilder but generally there wud b a directory option
see thru the options and see where
ur directories options are pointing to
and assign the path where ur class files ar created
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
•
•
•
•
Originally Posted by C++
server_crash, I'm using borland jbuilder 9 academic.
![]() |
Similar Threads
Other Threads in the Java Forum
- Previous Thread: resource not found error in eclipse.
- Next Thread: I couldn't used array object (Customer) in this project can you give me your hand ?
| Thread Tools | Search this Thread |
-xlint add android api applet application applications array arrays automation bank bi binary blackberry bluetooth chat class clear client code compile compiler component database development digit eclipse equation error event formatingtextintooltipjava fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide idea image infinite int integer j2me java javame javaprojects jetbrains jni jpanel jtable julia learningresources linux list main map method methods mobile myregfun netbeans nonstatic notdisplaying openjavafx pearl problem program project qt recursion repositories scanner screen scrollbar server set sms sort sorting spamblocker sql sqlserver state storm string superclass swing system thread threads tree variablebinding windows xor






