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!
精彩评论