Hello,
*Will anyone please help me in compiling java program.
*I am using Mandriva linux operating system.
*I have written a simple java program:
// This is a simple Java Program.
class Example
{
public static void main( String arg[])
{
System.out.println("This is a simple java program.");
}
}
*I have saved this program as Example.java
*I am trying to compile this program at $ prompt as
$ java Example.java
I AM GETTING ON SCREEN AS :
Exception in thread "main" java.lang.NoClassDefFoundError: Example/
java
Caused by: java.lang.ClassNotFoundException: Example.java
at java.net.URLClassLoader$1.run(URLClassLoader.java:220)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:208)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
336)
Error: Could not find the main class.
Error: A JNI error has occurred, please check your installation and
try again
PLEASE HELP ME OUT.
Satish Chandra
[email protected]
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---