Micromax Yureka: Indian Handset with CyanogenMod

Thesoap opera involving Cyanogen Inc., OnePlus, and Micromax is one of the most talked about … more

Chainfire Turns Your Bootanimation into a Logging Center

Having a nice boot animation certainly adds a little bit of aesthetic polish to your … more

Android TV Launcher Pushed to Google Play

Over the past decade, the tech universe has seen two drastic and widely contrasting changes with … more

Cyngn, OnePlus, Micromax – The Legal Battle

Recently, a battle has been waging in India over the rights to distribute the commercial … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

AOSP now requires Java 7, and works with OpenJDK

OP xdp

30th March 2014, 05:29 AM   |  #1  
OP Senior Member
Thanks Meter: 94
594 posts
Join Date:Joined: Nov 2010
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:

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:

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: [ View ]
8th April 2014, 05:05 PM   |  #2  
Senior Member
Thanks Meter: 1,006
668 posts
Join Date:Joined: Oct 2010
Donate to Me
Originally Posted by xdp

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: [ View ]
15th November 2014, 02:55 AM   |  #3  
Senior Member
Thanks Meter: 21
124 posts
Join Date:Joined: Jan 2014
So has anyone meanwhile successfully built Lollipop with OpenJDK?
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes