Install Linux JDK and run Eclipse

Source: Internet
Author: User

Fedora Linux JDK is still quite common, So I studied the JDK process and shared it with you here. I hope it will be useful to you. Due to some problems with Eclipse that comes with Fedora 4, for example, when you log on as Root, opening Eclipse will cause a crash. Therefore, you can only reinstall one of them when using Eclipse.

Preparations

First, make sure that you have installed the Linux JDK. Install Linux JDK: This document describes how to install and configure JDK in FC4.

1. Installation
First, go to the website] http://java.sun.com/j2se/1.5.0/download.jspto download the latest version of Linux JDK. RPM is a convenient software installation and management method, so download the rpm installation package named: jdk-1_5_0_06-linux-i586-rpm.bin. After downloading, use rpm to install Linux JDK. Enter the folder where the downloaded file is located. Log On with root and execute the following command: #./jdk-1_5_0_06-linux-i586-rpm.bin
Then, the Linux JDK will be installed automatically. After the installation is complete, you can see in the/usr/java/jdk1.5.0 _ 06 folder, which is the default big installation location.

2. Configuration
Next, configure the Linux JDK and set the environment variables. In the user's home directory, use vi to open the. bashrc file. The command is as follows: $ vi. bashrc
Add the following content at the beginning of the file:
# Setenvironmentforjava
ExportJAVA_HOME =/usr/java/jdk1.5.0 _ 06
ExportPATH = $ JAVA_HOME/bin: $ PATH
ExportCLASSPATH =.; $ JAVA_HOME/lib
Save and launch. Log out and then log on again. Run $ echo $ JAVA_HOME. If the correct environment variable is displayed, the setting is successful.

3. Test
Use your favorite editor to write the following HelloWorld. java file:
PublicclassHelloWorld {publicstaticvoidmain (String [] args) {System. out. println ("HelloWorld !");}}
Compile the file after saving:
$ JavacHelloWorld. java
Then execute:
$ JavaHelloWorld: If HelloWorld is successfully output! It indicates that the operation is successful!

Now, the configuration of Linux JDK is successful, and you can perform various development tasks.
After installing the Linux JDK, You need to download the Eclipse installation package and download the latest version at the following URL:
Http://www.eclipse.org/downloads/

Install

After downloading the installation package for Linux JDK, You can decompress and install it. Eclipse can be directly decompressed without installation. Run the following command to decompress: tar-zxvfeclipse-SDK-3.1.2-linxu-gtk.tar.gz/opt/eclipse to unzip eclipse to the/opt directory, you can also choose your favorite directory.

Start

The next step is to start Eclipse. Go to the installation directory and run $./eclipse to start Eclipse.
Then set the workspace as required. You can also write a simple program to test whether the program runs well.
In this way, we are done. It is found that Eclipse runs well in Linux JDK, and both startup and shutdown are faster than Windows.

  1. How to decompress Linux compressed files
  2. Learn about Linux tar compressed files
  3. How to install realplayer in Linux
  4. Overview
  5. Analyze svn commands from Linux

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.