i m using window xp and
jdk1.6.0.
i set environment variables as follow
user variables i creat new and in variable name "classpath" and in variable value .;C:\Program Files\Java\jdk1.6.0\bin;.;C:\World
after that i edit system variable as follow
i edit variable "path"
in variable value I append "C:\Program Files\Java\jdk1.6.0\bin" right side so now system variable is"%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0\bin"
After all this I restart p.c.
now i make program and save in c:\world
my program"HelloWorld.java" is as given below
package world;
class HelloWorld
{
public static void main(String a[])
{System.out.println("hello ji kya haal hai");
}
}
After that in command prompt i run following command:
C:\>set CLASSPATH=.;C:\;
C:\>set CLASSPATH // see what we have in CLSSPATH
CLASSPATH=.;C:\;
C:\>cd world
C:\world\javac HelloWorld.java
C:\world>java world.HelloWorld
Exception in thread "main" java.lang.UnsupportedClassVersion:Bed version n
umber in .class file
world/HelloWorld)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(unknown Source)
at java.security.SecureClassLoader.defineClass(unknown Source)
at java.net.URLClassLoader.defineClass(unknown Source)
at java.net.URLClassLoader.access$1(unknown Source)
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)
so plz help me