Results 1 to 4 of 4

Thread: java.lang.NoClassDefFoundError: Classname

  1. #1
    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.

  2. #2
    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

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    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

  4. #4
    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.

Similar Threads

  1. Replies: 5
    Last Post: 20-10-2010, 12:44 AM
  2. Eclipse: java.lang.UnsatisfiedLinkError
    By Gadin in forum Software Development
    Replies: 5
    Last Post: 29-07-2010, 04:47 AM
  3. Error - java.lang.NumberFormatException
    By Vodka in forum Software Development
    Replies: 5
    Last Post: 05-03-2010, 11:57 AM
  4. Error Java.lang.OutOfMemoryError
    By Logan 2 in forum Software Development
    Replies: 5
    Last Post: 04-03-2010, 12:42 PM
  5. What is java.lang.NullPointerException
    By Logan 2 in forum Software Development
    Replies: 5
    Last Post: 27-02-2010, 05:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,588,379.37631 seconds with 16 queries