Results 1 to 5 of 5

Thread: Please help

  1. #1
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Question Please help

    i keep getting error message no matter what i do

    --------------------Configuration: helloworldapp - JDK version <Default> - <Default>--------------------
    java.lang.NoClassDefFoundError: helloworldapp
    Caused by: java.lang.ClassNotFoundException: helloworldapp
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
    at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:320)
    Could not find the main class: helloworldapp . Program will exit.
    Exception in thread "main"
    Process completed.


    please explain and maybe how to fix it

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    As you can see from the trace, the class helloworldapp was not found on the classpath.
    You need to avail it on the classpath.

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default OK?

    so i need to put the helloworldapp into the same file as the class file is located in my C:\sun\SDK\jdk\class file?

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    No. Add its path to the classpath variable that you provide when running the program.

  5. #5
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    835
    Rep Power
    6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •