How to install JDK 1.6 on Ubuntu in order to compile Android System

Unfortunately there is not a java 1.6 package available on Ubuntu repository, but fortunately we have an alternative:

https://github.com/flexiondotorg/oab-java6

$ git clone https://github.com/flexiondotorg/oab-java6.git
$ cd oab-java6
$ sudo ./oab-java.sh

If compilation finished correctly just execute it:

$ sudo apt-get install sun-java6-jdk

Case you have other java packages installed, execute it:

$ sudo update-alternatives --config java

and choose number related to /usr/lib/jvm/java-6-sun/jre/bin/java and repeat this process to javac.

Thanks Vinicius Tinti for this tip.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s