Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

Reply

Join Date: Aug 2004
Posts: 350
Reputation: Ghost is an unknown quantity at this point 
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

 
0
  #1
May 23rd, 2005
Hi,

I'm trying to run my program in command prompt, but i get this error:
  1. Exception in thread "main" java.lang.NoClassDefFoundError: Invaders
Can anybody tell me what this error means?

Thanx.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 30
Reputation: yassar is an unknown quantity at this point 
Solved Threads: 0
yassar's Avatar
yassar yassar is offline Offline
Light Poster

Re: Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

 
0
  #2
May 23rd, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 350
Reputation: Ghost is an unknown quantity at this point 
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Re: Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

 
0
  #3
May 24th, 2005
yassar, thanx! I sorta understand this, but is there a specific line of code i need 2 fix???
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

 
0
  #4
May 24th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 350
Reputation: Ghost is an unknown quantity at this point 
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Re: Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

 
0
  #5
May 24th, 2005
server_crash, thanx! what directories do the classes, .java files, and the sounds and images have 2 be in?

Thank you again.
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

 
0
  #6
May 24th, 2005
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?
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 350
Reputation: Ghost is an unknown quantity at this point 
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Re: Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

 
0
  #7
May 24th, 2005
server_crash, I'm using borland jbuilder 9 academic.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 13
Reputation: frankcs is an unknown quantity at this point 
Solved Threads: 0
frankcs frankcs is offline Offline
Newbie Poster

Re: Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

 
0
  #8
May 25th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

 
0
  #9
May 25th, 2005
Originally Posted by C++
server_crash, I'm using borland jbuilder 9 academic.
It will be hard for me too help because I don't have JBuilder. Ok, look for an option to change the properties of your project. If you find it, it should say something about the source path,classpath, or the output path. Change it to the directory containing the file your trying to run. That should clear it up.
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 350
Reputation: Ghost is an unknown quantity at this point 
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Re: Exception in thread "main" java.lang.NoClassDefFoundError: Invaders Error

 
0
  #10
May 25th, 2005
server_crash, there's an option called "Output Path" you can change. Is this what I'm looking for?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC