Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 08-11-2009
Member
 
Join Date: Nov 2009
Posts: 2
java.lang.NoClassDefFoundError: Classname

I've took a look a same issue in a different thread and it didn't help at all.



Above is a screen shot of said problem, hw.class was clearly made in the Programs folder(C:\Program Files\Java\jdk1.6.0_17\bin\Programs) and I am sure the path is correct. This is the first time I've done java on this computer in the command prompt and the first time I have even got this error in the first place. I have done simple java programs before on a different computer that has a java icon on the desktop that launches a dos window. Any help would be appreciated.

Thanks.
Reply With Quote
  #2  
Old 09-11-2009
Member
 
Join Date: Feb 2009
Posts: 96
Re: java.lang.NoClassDefFoundError: Classname

Quote:
Originally Posted by Learningj View Post
I've took a look a same issue in a different thread and it didn't help at all.



Above is a screen shot of said problem, hw.class was clearly made in the Programs folder(C:\Program Files\Java\jdk1.6.0_17\bin\Programs) and I am sure the path is correct. This is the first time I've done java on this computer in the command prompt and the first time I have even got this error in the first place. I have done simple java programs before on a different computer that has a java icon on the desktop that launches a dos window. Any help would be appreciated.

Thanks.
1st off dl Jgrasp or some sort of of JE---
***reason is that the program will tell you what line of code is bad


I believe the error your getting is because the Main portion of your class is not working thus you are actually not creating a usable class.---If it was a usable class it would say hw.JAVA
Reply With Quote
  #3  
Old 09-11-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: java.lang.NoClassDefFoundError: Classname

The Java.lang. noclassdeffounder occurred in a code when the programmer write a wrong class name on the command prompt during the execution or running of the program.It has do to with the path between where you are (the current directory) and where the .class file is. If that isn't the same it won't work, unless you've done something with the CLASSPATH environment variable. You need to check out the following link, in order to resolve yoru above issue.

Exception in thread "main" java.lang.NoClassDefFoundError: [ClassName]

Java.lang.OutofMemory.Exception error
Reply With Quote
  #4  
Old 09-11-2009
Member
 
Join Date: Nov 2009
Posts: 2
Re: java.lang.NoClassDefFoundError: Classname

Quote:
Originally Posted by Modifier View Post
The Java.lang. noclassdeffounder occurred in a code when the programmer write a wrong class name on the command prompt during the execution or running of the program.It has do to with the path between where you are (the current directory) and where the .class file is. If that isn't the same it won't work, unless you've done something with the CLASSPATH environment variable. You need to check out the following link, in order to resolve yoru above issue.

Exception in thread "main" java.lang.NoClassDefFoundError: [ClassName]

Java.lang.OutofMemory.Exception error
Thanks for replying, I have tried both "javac -classpath . hw.java" and "java -classpath . hw.java" that was noted to do in the first link to try to resolve the classpath if that was the issue and I still got the same message. hmm

Thanks.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "java.lang.NoClassDefFoundError: Classname"
Thread Thread Starter Forum Replies Last Post
Exception in thread "main" java.lang.NoClassDefFoundError: [ClassName] Icarusul Software Development 5 20-10-2010 12:44 AM
Eclipse: java.lang.UnsatisfiedLinkError Gadin Software Development 5 29-07-2010 04:47 AM
Error - java.lang.NumberFormatException Vodka Software Development 5 05-03-2010 11:57 AM
Error Java.lang.OutOfMemoryError Logan 2 Software Development 5 04-03-2010 12:42 PM
What is java.lang.NullPointerException Logan 2 Software Development 5 27-02-2010 05:30 AM


All times are GMT +5.5. The time now is 03:01 AM.