Hello,
import java.io.*;
 
public class firstjava1
{
 	public static void main(String args[])
	{
		System.out.println("hi");
	}
}

C:\>javac firstjava1.java

C:\>java firstjava1
Exception in thread "main" java.lang.NoClassDefFoundError: firstjava1
Caused by: java.lang.ClassNotFoundException: firstjava1
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: firstjava1. Program will exit.

Thanks in advance..

I have coded the above java program and it creates the java class file when compiled but it don't allows me to execute the file..

My Path is set as : C:\Java\jdk1.6.0_24\bin

Can anyone help me out where's the mistake...??