eric scott

Greenhorn
+ Follow
since Jan 27, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by eric scott

ram, thanks for the advice.
I checked my path, and there was other things in there.
So I cut everything out except C:\Program Files\Java\jdk1.5.0_01\bin.
I tried to run the application again, and I got the same error.

Next, I checked my java runtime settings. The path for user is
"C:\Program Files\Java\jre1.5.0-01\bin\javaw.exe",
The path for the system is the exact same.

I also have oracle, and jre1.4 installed on my computer if this matters.

Your advice is appreciated,
Thanks,
Eric
13 years ago
I compile my application, but when I run the application I get this message,"
C:\>javac Ch2Birthdate.java

C:\>java Ch2Birthdate
Exception in thread "main" java.lang.UnsupportedClassVersionError: Ch2Birthdate
(Unsupported major.minor version 49.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)

C:\>

Now here is my code for the application

import javax.swing.*;
import java.util.*;
import java.text.*;


class Ch2Birthdate{

public static void main(String [] args){

String Input;

SimpleDateFormat sdf;


Input = JOptionPane.showInputDialog(null, "What is your birthdate?");
java.util.Date bdate = java.sql.Date.valueOf(Input);



sdf = new SimpleDateFormat("EEEE");

JOptionPane.showMessageDialog(null, "The day of your Birthday is: " + sdf.format(bdate));

}
}

Any advice is ok, thanks.
13 years ago