Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   Problem to compile sample java code in NetBeans (http://www.go4expert.com/forums/compile-sample-java-code-netbeans-t26714/)

zahid.hstu.java 16Sep2011 16:08

Problem to compile sample java code in NetBeans
1 Attachment(s)
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)

ManzZup 22Sep2011 21:47

Re: Problem to compile sample java code in NetBeans
the error says that the program calls to a class Main that is not available or the compiler cannot find it

All times are GMT +5.5. The time now is 13:39.