2

I have Ubuntu 12.10 x64 installed on a virtual device (VMware workstation) on a host system Windows 8. I downloaded android source code. I wanted to build it, and it says:

    Checking build tools versions...
************************************************************
You are attempting to build with an unsupported JDK.

You use OpenJDK but only Sun/Oracle JDK is supported.

************************************************************

I tried:

sudo apt-get -y remove --purge openjdk-7-jdk openjdk-7-jre

and I still have OpenJKD 7 installed. How can I uninstall OpenJDK and install a JDK which could build android?

Jorge Castro
  • 71,754

1 Answers1

5

In Ubuntu you don't have to uninstall one JDK to use another. You can have multiple Java versions installed and switch between them as you like. What matters is witch one is set as default.

You can install Oracle Java JDK follow this guide (easy option) or get it right from the Oracle here (well..less easy option).

Chose another Java loader:

sudo update-alternatives --config java

Chose another compiler (this is what you need):

sudo update-alternatives --config javac

Chose Java Web Start:

sudo update-alternatives --config javaws 

You might also be interested in installing Android SDK on your Ubuntu VM. Here is a great guide for that.

Tanel Mae
  • 1,340