1. Installing JDK 1.7
Install JDK 1.7 By default in Ubuntu (/USR/LIB/JVM/JAVA-7-OPENJDK-AMD64)
If not available for download: Wget-c http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz or
Http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u4-downloads-1591156.html
Unzip: sudo tar zxvf jdk-7u5-linux-x64.tar.gz-c/USR/LIB/JVM
Modify environment variables: sudo gedit/etc/profile
Add at the end:
# for Java
Export JAVA_HOME=/USR/LIB/JVM/JAVA-7-OPENJDK-AMD64
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin:${jre_home}/bin: $PATH
Source/etc/profile//Enable configuration to take effect or restart your computer
Configuring the default JDK version
sudo update-alternatives--install/usr/bin/java Java/usr/lib/jvm/java-7-sun/bin/java 300
sudo update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/java-7-sun/bin/javac 300
sudo update-alternatives--config java//Select the desired version
Java-version//Detect if the JDK is successfully installed
Java Version "1.7.0_85"
OpenJDK Runtime Environment (IcedTea 2.6.1) (7u85-2.6.1-5ubuntu0.12.04.1)
OpenJDK 64-bit Server VM (build 24.85-b03, Mixed mode)
2. Installing Tomcat 7
3. Install Maven
4. Install Eclipse
Configuring the Java Environment in Ubuntu 12.04 (install JDK, Tomcat, MAVEN, Eclipse)