On Sep 8, 2009, at 4:49 PM, Baiss Eric Magnusson wrote:

I assume the following error I get when I try to deploy on the 10.5 OSX Server is a JVM version problem.

From launch I get
java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:675)

From Java Preferences

On the OSX 10.6 development machine I see as the Default
Java SE 6 64-bit
Java SE 6 32-bit

On OSX 10.5 Intel Server I see as the Default

J2SE 5.0 32-bit
Java SE 6 64-bit
J2SE 5.0 64-bit
J2SE 1.4.2 32-bit

In Eclipse if I try to set the JRE to 5.0 I get
"The selected JRE does not support the current compiler compliance level of 1.6"

There is no Java SE 6 32-bit JVM for OSX Server 10.5

I'm stuck, which side can I bend?

----
Baiss Eric Magnusson
http://www.CascadeWebDesign.com


Just FYI, you can find out from the class file which version it is. This information is put into the magic number file that the "file" command (on Mac OS X) uses.

If you are looking at a 1.5 class file, you see:

% file er/calendar/ERCalendarEvent.class
er/calendar/ERCalendarEvent.class: compiled Java class data, version 49.0
%

"49.0" is the 1.5 JVM class format major and minor version number.

I found these from a google search. Sun is the canonical source of these numbers.

major   minor   Java platform version

45              3               1.0
45              3               1.1
46              0               1.2
47              0               1.3
48              0               1.4
49              0               1.5
50              0               1.6

It is very useful to be able to look at the class files themselves to figure this out and double-check the versions, instead of just looking at your tools and seeing what you think it should be.

cheers - ray
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to