Results 1 to 2 of 2
  1. #1
    PeDz is offline Member
    Join Date
    Feb 2012
    Posts
    8
    Rep Power
    0

    Default NoClassDefFoundError

    public class HelloWorld {

    public static void main (String[] args){

    System.out.print("Hello World!");

    }
    }
    -------------------------------------------------------
    This is my code but when i run it, I get this:

    java.lang.NoClassDefFoundError: HelloWorld/java
    Caused by: java.lang.ClassNotFoundException: HelloWorld.java
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
    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 48)
    Could not find the main class: HelloWorld.java. Program will exit.
    Exception in thread "main"
    Process completed.


    Please HELP!! I really need to fix this..

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,344
    Blog Entries
    7
    Rep Power
    20

    Default Re: NoClassDefFoundError

    You already asked this in the New To Java forum section; I'm closing this thread.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. NoClassDefFoundError
    By sriram56 in forum IntelliJ IDEA
    Replies: 0
    Last Post: 11-26-2011, 03:04 AM
  2. NoClassDefFoundError
    By Leeish in forum Advanced Java
    Replies: 10
    Last Post: 09-27-2011, 09:08 AM
  3. NoClassDefFoundError
    By bmeu in forum JDBC
    Replies: 1
    Last Post: 10-30-2010, 08:08 PM
  4. NoClassDefFoundError
    By Josisco in forum JDBC
    Replies: 2
    Last Post: 10-30-2010, 08:07 PM
  5. NoClassDefFoundError
    By Dbirge in forum New To Java
    Replies: 0
    Last Post: 03-16-2010, 05:01 PM

Posting Permissions

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