1. Install gcc
Sudo apt-Get update
Sudo apt-Get install build-essential
2. Install sun-java6-jdk
Sudo VI/etc/APT/sources. List
Add Deb http://archive.canonical.com/ubuntu lucid partner save exit
You can directly copy the previously downloaded files to/var/Cache/APT/archives, so you do not need to download them online again.
Sudo apt-Get install sun-java6-jdk
After installation, enter Java-version to check whether the installation is successful.
If there are multiple JDK, you can enter sudo Update-alternatives -- config Java to switch
Sudo/etc/environment
Join:
Java_home = "/usr/lib/JVM/Java-6-sun-1.6.0.20"
Path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: $ java_home/bin"
Classpath =.: $ java_home/lib/TD. jar: $ java_home/lib/tools. Jar
Path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: /usr/games is the original content