简体   繁体   中英

App Engine ant macros for 1.6 not working from java 1.5

According to what is advertised in App Engine for Java Getting Started Guide , I should be able to build and compile app engine version 1.6 even though I only have JDK 1.5 on my Mac. This may be true for eclipse users but I'm an ant user. The ant scripts rely on a file called ant-macros.xml which is in the app engine directory. This in turn tries to run some java classes but, guess what, they were compiled for jdk 1.6 so I get java.lang.UnsupportedClassVersionError.

Any workarounds for this? Seems like a real bug, should I enter it in the app engine issue tracker? Trying to upgrade to JDK 1.6 on my Mac would be the obvious answer of course but that is turning out to be pain (no download on the Oracle site, latest Apple Java updates for Leopard didn't have Java 1.6, plus this troubling message ). I have been meaning to upgrade my OS to Snow Leopard anyway -- is that going to give me Java 1.6? Or am I still going to be stuck?

As soon as you compile something for version 1.6 it won't run on 1.5. Compile your source with 1.5.

javac -target 1.5 -source 1.5

From oracle you can get a java 7 Mac OS X developer preview that sounds somewhat unstable. I don't know if apple provides its own jdk like other vendors(IBM) do it for their systems(AIX).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM