Detailed steps for building a JAVA environment in Linux

Source: Internet
Author: User

This document describes how to build a JAVA environment in Linux.

1. Download JDK, it is recommended to download RPM self-extract format (RPM in self-extracting file, j2sdk-1_4_2_08-linux-i586-rpm.bin ).

2. Execute the download package:
Chmod 755 j2sdk-1_4_2_08-linux-i586-rpm.bin
/J2sdk-1_4_2_08-linux-i586-rpm.bin

There will be a piece of Sun Protocol, several times the Space key, when asked whether to agree, you can press yes.
Note: If you run the unzip command directly to decompress the package, you can obtain an rpm package.

Re-install the rpm package: rpm-ivh j2sdk-1_4_2_08-linux-i586.rpm

3. Set environment variables:
Change/etc/profile to implement
Add the following at the end of the file:

Export JAVA_HOME =/usr/java/j2sdk1.4.2 _ 08
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export PATH = $ PATH: $ JAVA_HOME/bin

Download eclipse-sdk-3.1-linux-gtk.tar.gz and decompress it to/opt.
Compile a script to start eclipse, named eclipse, and saved in the/usr/bin directory:

#! /Bin/bash
Export JAVA_HOME =/usr/java/j2sdk1.4.2 _ 08
Export CLASSPATH =/usr/java/j2sdk1.4.2 _ 08/lib
/Opt/eclipse-vm/usr/java/j2sdk1.4.2 _ 08/bin/java-data/root/workspace &

5. Create a starter on the desktop with the command bash eclipse. You can select the built-in eclipse icon.

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.