开发者

What would happen if you tried to build a GAE/Java project using Java 7?

开发者 https://www.devze.com 2023-04-05 06:57 出处:网络
I\'d like to use some Java 7 features in a GAE project. Is this possible? If not, what would happen if 开发者_C百科I tried to do this?If you have not used any new APIs the code should be probably ju

I'd like to use some Java 7 features in a GAE project.

Is this possible?

If not, what would happen if 开发者_C百科I tried to do this?


If you have not used any new APIs the code should be probably just a little faster if anything. The JVM is only interested in the byte-code generated. If the JavaC 7 doesn't produce an opcode that JavaC 6 can't understand then it really doesn't have a way of knowing you used a newer version!

This means you should be able to use String in case statements without problems.

They major caveat is that if you use classes or methods added by Java 7 then the could will fail, likely with an AbstractMethodError.

But yes, to repeat the others, just go try it out!

0

精彩评论

暂无评论...
验证码 换一张
取 消