Build a Java Development Environment on Ubuntu 10.04

Source: Internet
Author: User

Overall steps:

Step 1: Install JDK;

Step 2: Install eclipse;

Step 3: Install extensibletool platform and Java IDE.

 

Install JDK:

1: Download jdk-7-linux-i586.tar.gz

PS: Pay attention to the selection of the system version. You can find the answer by using the 32-bit or 64-bit uname-a command.

2: unzip and install

Access the tar.gz file...

Tar-xzf jdk-7-linux-i586.tar.gz

Next, move the extracted folder to the/usr/lib/JVM directory.

Before that, you must have root permissions Su-L and then enter the password of the root account, you also need to create a folder mkdir/usr/lib/JVM in the/usr/lib directory.

After completing these preparations, we can move the JDK file to the desired location.

Mvjdk1.7.0/usr/lib/JVM

In order to facilitate the configuration of environment variables, we change the JDK file name, the general online JDK file changed to jdk-7-sun.

MV/usr/lib/JVM/jdk1.7.0/usr/lib/JVM/Java-7-sun ·

3. Modify Environment Variables

Vim ~ /. Bashrc

(If Vim is not installed, run: sudo apt-Get install Vim first)

Exportjava_home =/usr/lib/JVM/Java-7-sun

Exportjre_home =$ {java_home}/JRE

Exportclasspath =.: $ {java_home}/lib: $ {jre_home}/lib

Exportpath =$ {java_home}/bin: $ path

Add to end

Save and exit

Source ~ /. Bashrc

4: configure the default JDK version

Sudo Update-alternatives -- install/usr/bin/Java/usr/lib/JVM/Java-7-sun/bin/Java 300

Sudo Update-alternatives -- install/usr/bin/javac/usr/lib/JVM/Java-7-sun/bin/javac 300

Sudo Update-alternatives -- install/usr/bin/Jar/usr/lib/JVM/Java-7-sun/bin/jar300

Check

Sudo Update-alternatives -- config Java

5. view the Java version number.

Command line:

Java-version

The system will list

Javaversion "1.7.0 _ 01"

Java (TM) se Runtime Environment (build 1.7.0 _ 01-b08)

Javahotspot (TM) Client VM (build 21.1-b02, mixed mode)

Then install the remaining two software in the Software Center.

Of course, you can also download eclipse and run it directly after installing Java runtime and extensibletool platform and Java IDE.

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.