Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,846 Members 37,595 Now Online
XDA Developers Android and Mobile Development Forum

AOSP now requires Java 7, and works with OpenJDK

Tip us?
 
xdp
Old
#1  
Senior Member - OP
Thanks Meter 94
Posts: 594
Join Date: Nov 2010
Default AOSP now requires Java 7, and works with OpenJDK

I was just looking at the build instructions page for AOSP and noticed a significant change that must've just happened in the last week or so. Apparently Java 7 is now required, and Google officially recommends using OpenJDK. Under where it says "To develop for older versions..." it lists Java 6 next to KitKat, meaning this is apparently for code newer than KitKat. I don't think OpenJDK was compatible before, so that plus the move to Java 7 seems noteworthy. Can anybody who watches AOSP commits comment on when this change occurred? Is this signifying a non-minor update is coming after KitKat?

For reference, here is the relevant text of the current page at http://source.android.com/source/initializing.html:

Code:
Installing the JDK

The latest version of Android in the Android Open Source Project (AOSP) requires Java 7. On Ubuntu, use OpenJDK.

Java 7: For the latest version of Android

$ sudo apt-get update
$ sudo apt-get install openjdk-7-jdk
Optionally, update the default Java version by running:

$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
To develop older versions of Android, download and install the corresponding version of the Java JDK:
Java 6: for Gingerbread through KitKat
Java 5: for Cupcake through Froyo
And this is what it said on Feb. 16 according to Wayback Machine:

Code:
Installing the JDK

The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.

Java 6: for Gingerbread and newer

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
Java 5: for Froyo and older

$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
The Following User Says Thank You to xdp For This Useful Post: [ Click to Expand ]
 
C-o-M
Old
#2  
Senior Member
Thanks Meter 921
Posts: 643
Join Date: Oct 2010

 
DONATE TO ME
Quote:
Originally Posted by xdp View Post
Can anybody who watches AOSP commits comment on when this change occurred? Is this signifying a non-minor update is coming after KitKat?
Here's the change: https://android.googlesource.com/pla...500db70cbc82b2

Since this is already online, I wouldn't expect this to be a sign for a big update. One of the beasts that needed JDK6 was chromium. I took a quick look into the changes and didn't see really much. Only some fixes to be able to compile with JDK7. I'll give it a try if it compiles.
The Following User Says Thank You to C-o-M For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes