error installing java on ubuntu 10 64bit
android, installation, java, ubuntu
Solution
The problem is that you should now download JDK manually. Somewhere I found these steps and it worked fine in my case:
- Download Java SE 6 JDK for Linux x86 self-extracting binary (if you work with 32bit platform)
- From the download folder, make the file executable `chmod a+x jdk-6u<version>-linux-i586.bin`
- Move the file to the jvm folder `sudo mv jdk-6u<version>-linux-i586.bin /usr/lib/jvm/`
- Change to the jvm folder and run the self-extracting binary `cd /usr/lib/jvm`
- `sudo ./jdk-6u<version>-linux-i586.bin`
- Everything will be extracted to a new jdk1.6 folder and you can delete the .bin file now.
- Make a symbolic link to the new java binary in the alternatives folder. `sudo ln -s -b /usr/lib/jvm/jdk1.6<version>/jre/bin/java /etc/alternatives/java`
Append in your ~/.bashrc
JAVA_HOME=/usr/lib/jvm/jdk1.6.<version>/
PATH=$PATH:$JAVA_HOME/bin
Double-check the version `java -version`
Remember that you can work only with JDK v6 version.
Problem
EDIT I added this note to explain why I keep this question here. I added "Android" as keyword and I'd like to know whether someone else has tried to download the code and how it is possible to work around this problem. I fear that if I ask Ubuntu they would suggest me to use OpenJDK but the question is: did someone use that SDK to build Android code? ORIGINAL Sometime ago I downloaded the android source code on Ubuntu 10 64bit. I had problems but at the end I managed to get everything working. Now I'm trying to do it again on a fresh install of the same Ubuntu version but I'm having a problem. Although I followed the instruction here I keep having the error: Package sun-java6-jdk is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package sun-java6-jdk has no installation candidate Googling gives you a lot of results that all give you the same solution: ``` sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" sudo apt-get update sudo apt-get install sun-java6-jdk ``` I did it but it didn't work. I'm running Ubuntu on a VM under VMWare. I have also tried to add another source: sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner but it didn't help Maybe the answer is here: Answer in SuperUser but it is weird that on the Android portal there isn't any mention of it