• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UnsupportedClassVersionError caused by 10.6 developed WOA being deployed on 10.5 server?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UnsupportedClassVersionError caused by 10.6 developed WOA being deployed on 10.5 server?


  • Subject: Re: UnsupportedClassVersionError caused by 10.6 developed WOA being deployed on 10.5 server?
  • From: Ray Kiddy <email@hidden>
  • Date: Tue, 8 Sep 2009 21:08:02 -0700


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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >UnsupportedClassVersionError caused by 10.6 developed WOA being deployed on 10.5 server? (From: Baiss Eric Magnusson <email@hidden>)

  • Prev by Date: Re: EO Generation with no "_" on Superclass
  • Next by Date: Re: UnsupportedClassVersionError caused by 10.6 developed WOA being deployed on 10.5 server?
  • Previous by thread: Re: UnsupportedClassVersionError caused by 10.6 developed WOA being deployed on 10.5 server?
  • Next by thread: EO Generation with no "_" on Superclass
  • Index(es):
    • Date
    • Thread