[Q] java jre/jdk 1.5 on ubuntu 11.04

Search This thread


Senior Member
Mar 15, 2011
Lynn, Mass
ok guys i have a little issue lol i've spent the last 2 days trying to build a froyo rom from source! I foolowed this guide exactly as it says to do (http://source.android.com/source/initializing.html) and when i get to the part of building the rom and to run 'make j4' (making the code i assume) it says that i do not have the correct version of java, says i have 1.6.0_20 and the correct version is 1.5..... so i spent all night trying to figure out how to get the 1.5 version, so my question is how do i get the correct version of java properly installed so i can finish the build? I have already pulled the rom from source so i have the neccessary files, but ubuntu wont let me build it without the proper java installed lol can someone please help??


Senior Member
Sep 14, 2010
First remove the current java - i assume with the command:

sudo apt-get --purge remove sun-java6-jdk

Then get the older java as follows:

$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk

if you ever want to make a gingerbread ROM then you will have to get the newer java back
Last edited: