JDK, Eclipse, ADT, and quick icon in Ubuntu 12.04 LTS (64bit) Environment, 12.04adt
1. In FriendlyARM, Tiny4412, and the installation package, you can add:
Install JDK (Java), select the required JDK, or install it all. A) OpenJDK-6.0
- $ Sudo apt-get update
- $ Sudo apt-get install openjdk-6-jdk
B) OpenJDK-7.0
- $ Sudo apt-get update
- $ Sudo apt-get install openjdk-7-jdk
C) SunJDK-6.0
- $ Sudo add-apt-repository "deb http://archive.canonical.com/ubuntu precise partner"
- $ Sudo apt-get update
- $ Sudo apt-get install sun-java6-jdk
D) OracleJDK-8.0
- Sudo add-apt-repository ppa: webupd8team/java
- Sudo apt-get update
- Sudo apt-get install oracle-java8-installer
E) set the default JDK
- $ Sudo update-alternatives -- config java
- $ Sudo update-alternatives -- config javac
Ps) to uninstall JDK installed using apt-get, run the following command:
- $ Sudo apt-get remove -- purge XXX
Download and install ADT
Unzip the package to your favorite location:
(I put it in, usr/lib/adt)
Add quick chart
Open Terminal
Input: sudo gedit/usr/share/applications/eclipse. desktop
Add:
[Desktop Entry]Encoding=UTF-8Name=eclipseComment=Eclipse IDEExec=/usr/lib/adt/adt-bundle-linux-x86_64-20140702/eclipse/eclipseIcon=/usr/lib/adt/adt-bundle-linux-x86_64-20140702/eclipse/icon.xpmTerminal=falseStartupNotify=trueType=ApplicationCategories=Application;Development;
Save it;
Exec =/usr/lib/adt/adt-bundle-linux-x86_64-20140702/eclipse
Modify the installation directory for your eclipse
Edit environment Variable: sudo gedit/etc/environment
View JDK version: java-version
Reference: http://www.cnblogs.com/qq19831030qq/archive/2012/05/09/2491275.html