Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with ant and Java 6 update 2



Well, that was almost all I needed. Now launching Resin 3.1.5, I get:

[show] WEB-INF/web.xml:24: com.caucho.server.webapp.WebApp.addServlet(): java.lang.UnsupportedClassVersionError:
Bad version number in .class file


22: 	</servlet>
23: 	
24: 	<servlet>
25: 		<servlet-name>InitServlet</servlet-name>
26: 		<servlet-class>com.latencyzero.satdb.InitServlet</servlet-class>


com.caucho.config.LineConfigException: WEB-INF/web.xml:24: com.caucho.server.webapp.WebApp.addServlet():
java.lang.UnsupportedClassVersionError: Bad version number in .class file



It seems to not like my class file version. I cleaned and rebuilt my classes, but no go.


I tried specifying no target, and specifying 1.6, to no avail.

TIA,
Rick

On Sep 24, 2008, at 14:52:43, Mike Swingler wrote:

On Sep 24, 2008, at 2:48 PM, Rick Mann wrote:

For some reason, ant seems to continue to treat my builds as happening under 1.5; that is, I can't use a 1.6-only class like java.net.HttpCookie. If I make a simple test program using that class, and compile and run with javac/java from the command line, it works fine.

Does anyone have any suggestions?

$ java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-146)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-56, mixed mode)

$ ant -version
Apache Ant version 1.7.0 compiled on December 13 2006

You have to define your $JAVA_HOME environment variable to point to: /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

Ant is not dynamically switchable via Java Preferences, like the the standard Java tools are.

Hope this helps,
Mike Swingler
Java Runtime Engineer
Apple Inc.

-- Rick

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Problems with ant and Java 6 update 2 (From: Rick Mann <email@hidden>)
 >Re: Problems with ant and Java 6 update 2 (From: Mike Swingler <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.