|Java 1.7||bob||6/13/12 7:06 AM|
I'm trying to use this notation in my code:
int x = 5_000_000;
So, I need Java 1.7.
However, I get this error:
[2012-06-13 09:01:43 - wall] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
Any thoughts on this? Will 1.7 probably be supported soon?
|Re: [android-developers] Java 1.7||Daniel Drozdzewski||6/13/12 7:36 AM|
It probably won't be supported soon for multitude of reasons. Simply
set compiler compliance to 1.6 in Eclipse and live without funky Java
I know, it is not, what you asked for, but features of Java 7 are a
bit more than the nice way of representing numerals.
Have a look here:
... that's quite a lot to port to Dalvik (even when only looking at
HotSpot and language changes).
Bear in mind that many new things in Java7 are possible specifically
because the platforms that Java7 addresses have different (much more
relaxed) constraints compared even to 4 core 1GB RAM mobile device.
For example InvokeDynamic allows JVM to run trully dynamic languages,
which are high productivity and all that, but cost in terms of
processing and memory.
Technicalities aside, remember that Google and Oracle only finished
one big lawsuit. I don't think big G would like to have another one on
their hands just yet.
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-d...@googlegroups.com
> To unsubscribe from this group, send email to
> For more options, visit this group at
|Re: [android-developers] Java 1.7||al||6/14/12 2:27 AM|
Didn't the lawsuit go well for Google? As far as I know, the judgment was that language syntax and api cannot be patented. Of course, implementing the new library would be quite some effort. But supporting the new java syntax should not be such an effort. As far as I know, on bytecode level only invokedynamic was added and that code is not used by the java compiler (only by dynamic languages like jruby). So, a quick way to enable the new syntax features seems to be to
1) remove the errors & warnings
2) add an error/warning if invokeDynamic is used
Alternatively, it might be possible to add an additional build step (or eclipse builder) to just patch the version number of the class files to pretend they are java 1.6 class files.
|Re: [android-developers] Java 1.7||Mark Murphy||6/14/12 3:34 AM|
Further discussion on how to modify Dalvik to support Java 7 belongs
someplace else, as it is off-topic for this list.
If you are planning on contributing to this work, try the
android-contrib Google Group.
If not, try the android-discuss Google Group.
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
Android Training... At Your Office: http://commonsware.com/training