As Android does not currently support java7, I find myself wondering if they have made an official comment if they are working on supporting it?
Asked
Active
Viewed 1.7k times
39
-
1Get more information here at this thread. [Android & Java7][1] [1]: http://stackoverflow.com/questions/7153989/java-7-language-features-with-android – coder_For_Life22 Dec 16 '11 at 13:59
-
2It does not really answer the question, they just try to work around the limitation. – Dalmas Dec 16 '11 at 14:07
-
13I don't think you can expect an 'official' statement from either side whilst Oracle and Google are locked in a lawsuit over alleged patent infringements – NickT Dec 16 '11 at 14:35
-
[It's now supported](http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Using-sourceCompatibility-1.7)! – Takhion Nov 12 '13 at 14:34
1 Answers
20
I was under the impresssion that android didn't use oracle java, it uses a subset of apaches harmony java: http://en.wikipedia.org/wiki/Apache_Harmony#Use_in_Android_SDK

Dessus
- 2,147
- 1
- 14
- 24
-
1
-
While this isnt a "perfect" answer, it does convince me that I wont get a better one. So I'll just accept this one :P. Congrats! – pgsandstrom Dec 21 '11 at 09:06
-
1@pgsandstrom: Harmony is dead. Google has no choice but to support Oracle Java7. – Gili Oct 03 '12 at 22:43
-
3@Gili: Or just continue with the current version of Harmony, or throw a bunch of developers at Harmony and resurrect it. :) – Bjarke Freund-Hansen Oct 09 '12 at 10:52
-
since java is a language , couldn't google just implement the API (or a part ) of it ? – android developer Jan 28 '13 at 21:49
-
@androiddeveloper That is true that it could be done. But if you consider how different Oracle Java and Apache Java are, does it really matter? The UI are completely different, many concepts core to java such as how bitmaps and memory are handled; not to mention application lifecycles are all different. I actually found the assumptions I made with Android development based on experience with .NET and Java very wrong and dangerous. I think that if there is value, someone will likely create a library to port parts of Java 7 that are attractive to Android. – Dessus Feb 03 '13 at 02:39
-
I have used Mono, as I am largely a .NET developer, and Mono is in the same boat of only supporting a subset of features. I thought this would bother me, but it actually doesn't as what you need is there, and what you don't usually won't be. Its very rare that something that is needed is not there. I think that is a parallel situation. – Dessus Feb 03 '13 at 02:41
-
that's too bad , since i really liked some of the new features , even if they are really small , like the switch-case for strings . – android developer Feb 03 '13 at 06:48
-
yea and closures. The thing is, those are somewhat syntactic sugar anyway; you can probably use an IDE or aspect oriented mechanism to compile them into other equivilent code if you really really wanted them. Its more like nice to have, rather than a requirement. You could use the state gang of four pattern if you have more than a few cases for your switch statement. I do love syntactic sugar, so I feel for your position. Closures are currently an addon library for java as I understand it. Maybe something similar can be done to make a switch like method chain for syntactic ease. – Dessus Feb 03 '13 at 06:56
-
i wonder if google will add more features to the java part of android . Do you predict any new advancements on the Harmony version of java ? – android developer Feb 03 '13 at 15:09
-
I think currently google would be more focused on doing backwards compatability library enhancements, such as the fragment support libraries. Unfortunately most people are on 2.3.5 so there is alot of value in rolling the new api libraries back to older android versions. Harmony is quite primative in terms of runtime as compared with Java. I would prefer that google improved harmony performance ahead of new features. I get the feeling that google implemented java for android mainly to provide a reference language implementation on android. I would predict a different language being implemented – Dessus Feb 04 '13 at 08:17
-
I get the feeling too, that google is unhappy with .Net and Java as the most mainstream of technologies, as they are not as good as they could be at being platform agnostic. I heard rumors that google were thinking about using the .NET CLR standard; but they decided to not use it. I think that google like python, so I wouldn't be surprised to see something come from that. I also have seen some google visual languages which were interesting. They also have their typesafe version of javascript (Dart) which could end up being android friendly. – Dessus Feb 04 '13 at 08:24