Install the JDK + Eclipse + Tomcat configuration environment in Ubuntu

Source: Internet
Author: User
Environment: Ubuntu12.04 installation: JDK1.7 + EclipseJunoServiceRelease1 + Tomcat7.0 environment configuration 1 installation and configuration JDK1.71. decompress the downloaded JDK. $: tar-xvf ~ /Downloads/jdk-7u3-linux-i586.tar.gz2. Create a directory to store JDK & nb

Environment: Ubuntu 12.04
 
Installation: JDK1.7 + Eclipse Juno Service Release 1 + atat7.0 environment Configuration
 
1. install and configure JDK1.7
 
1. decompress the downloaded JDK.
$: Tar-xvf ~ /Downloads/jdk-7u3-linux-i586.tar.gz
 

2. Create a directory to store JDK
$: Sudo mkdir-p/usr/lib/jvm/jdk1.7.0
 

3. Move the files under JDK to the new directory.
$: Sudo mv jdk1.7.0 _ 03/*/usr/lib/jvm/jdk1.7.0/
 

4. Create a default JDK startup
$: Sudo update-alternatives -- install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
 
$: Sudo update-alternatives -- install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
$: Sudo update-alternatives -- install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
Now, JDK installation is complete.
 

Run the following code to view the current JDK versions and configurations:
$: Sudo update-alternatives -- config java
 

Show ---- there is only one candidate item in the Link Group java:/usr/lib/jvm/jdk1.7.0/bin/java
No configuration is required.
 

5. Set JDK Environment Variables
 
$: Sudo su
 
$: Vim/etc/environment
 
Add red part
 
PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/lib/jvm/jdk1.7.0/bin"
CLASSPATH = ".:/usr/lib/jvm/jdk1.7.0/lib"
JAVA_HOME = "/usr/lib/jvm/jdk1.7.0"
 

Save and exit
 
$: Sudo source ~ /. Bashrc (enable the setting to take effect without restarting)
 
$: Java-version
 
Display: java version "1.7.0 _ 09"
Java (TM) SE Runtime Environment (build 1.7.0 _ 09-b05)
Java HotSpot (TM) Server VM (build 23.5-b02, mixed mode)
 

Indicates that the installation is successful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.