1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Problem to compile sample java code in NetBeans

Discussion in 'Java' started by zahid.hstu.java, Sep 16, 2011.

  1. zahid.hstu.java

    zahid.hstu.java New Member

    I am new bie in java. learning the concepts theoretically. in the mean time i have downloaded sample java project source code in netbeans. But tried to compile my self but not succeed.

    can you please tell me the way how can i do it.

    Here is the code

    named student_record_information

    its showing errors like this

    java.lang.NoClassDefFoundError: javaapplication1/Main
    Caused by: java.lang.ClassNotFoundException: javaapplication1.Main
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: javaapplication1.Main.  Program will exit.
    Exception in thread "main" Java Result: 1
    BUILD SUCCESSFUL (total time: 2 seconds)

    Attached Files:

  2. ManzZup

    ManzZup New Member

    the error says that the program calls to a class Main that is not available or the compiler cannot find it

Share This Page