problem gettin output

hey guys im new to java .. I just started with my first program Helloworld and could run it well but when im tryin to get the output it says HelloWorldApp.java: cannot execute I m not aware of tht means so pls i wish someone could help me sortin it out

[259 byte] By [raghu11983a] at [2007-11-27 10:44:33]
# 1

How are you running it? Have you compiled it?

georgemca at 2007-7-28 20:07:33 > top of Java-index,Java Essentials,New To Java...
# 2

Don't post multiple threads please.

http://forum.java.sun.com/thread.jspa?threadID=5195469&tstart=0

SomeoneElsea at 2007-7-28 20:07:33 > top of Java-index,Java Essentials,New To Java...
# 3

im sorry this is my first time here will be careful

raghu11983a at 2007-7-28 20:07:33 > top of Java-index,Java Essentials,New To Java...
# 4

yeah i did compile it .I mean a .class file is created. there is problem when iam tryin to check the output

raghu11983a at 2007-7-28 20:07:33 > top of Java-index,Java Essentials,New To Java...
# 5

yeah I tried it but it says

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad vers

umber in .class file

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.ja

4)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

at java.net.URLClassLoader.access$100(URLClassLoader.java:56)

at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

This is my code

class HelloWorldApp {

public static void main(String[] args) {

System.out.println("Hello World!"); // Display the string.

}

}

raghu11983a at 2007-7-28 20:07:33 > top of Java-index,Java Essentials,New To Java...
# 6

Your compiler is newer than your JRE. Try this:

javac -version

java -version

BigDaddyLoveHandlesa at 2007-7-28 20:07:33 > top of Java-index,Java Essentials,New To Java...
# 7

that means that you compiled it using 5 or 6, and are running it using an old version.

java -version// what version runtime is

javac -version // what version compiler is

SomeoneElsea at 2007-7-28 20:07:33 > top of Java-index,Java Essentials,New To Java...
# 8

k thank u guys ...THX VERY MUCH

raghu11983a at 2007-7-28 20:07:33 > top of Java-index,Java Essentials,New To Java...
# 9

yeah tht shld be the reason

Message was edited by:

raghu11983

raghu11983a at 2007-7-28 20:07:33 > top of Java-index,Java Essentials,New To Java...