Running program via command-line

I've using NetBeans IDE 5.5 and to run my projects, I simply click the "Run" button and everything goes fine. When I build the project, it says this:init:

deps-jar:

compile:

To runthis application from the command line without Ant,try:

java -jar"/home/tristan/Java Programs/CalendarProgram/dist/CalendarProgram.jar"

jar:

BUILD SUCCESSFUL (total time: 1 second)

I try that and I get:[tristan@tristan ~]$ java -jar"/home/tristan/Java Programs/CalendarProgram/dist /CalendarProgram.jar"

Exception in thread"main" java.lang.UnsupportedClassVersionError: UserInterface (Unsupported major.minor version 50.0)

at java.lang.ClassLoader.defineClass0(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$100(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)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

This happens on both my Fedora Core 5 and Windows XP machines. Maybe I'm just oblivious to the problem, but if it's giving me that argument to run, why won't it work but works when I click "Run" in NetBeans?

[1758 byte] By [tristanlee85a] at [2007-11-27 3:08:09]
# 1
Because your netbeans is setup to use one jdk and your PATH for command line defaults to an earlier jdk. set your path.
masijade.a at 2007-7-12 3:56:00 > top of Java-index,Java Essentials,Java Programming...
# 2
Alriight. Well, when I type in java -version. It says I have 1.4.2 and NetBeans uses 1.6. I have no idea where 1.4.2 is installed (Linux), but since I'm compiling it with 1.6, does that mean no one else can run the program unless they have 1.6 on their machine?
tristanlee85a at 2007-7-12 3:56:00 > top of Java-index,Java Essentials,Java Programming...