Build a Java Development Environment in RedHat9.0Linux

Source: Internet
Author: User
You may sometimes need to develop java in Linux. In fact, many companies use Linux as their projects. This article describes how to build a java Development Environment on RedHat9.0. Finally, Eclipse3.0 is used. Recently, IBM released Eclipse3. For the official version 0, install it in Linux and develop a Java application. First download J2SDK1.4.2-http://java.sun.com from linux-i586.bin, from ht

You may sometimes need to develop java in Linux. In fact, many companies use Linux as their projects. This article describes how to build a java Development Environment on Red Hat9.0. Finally, Eclipse3.0 is used.

Recently, IBM released Eclipse3. For the official version 0, install it in Linux and develop a Java application.

First download J2SDK1.4.2-http://java.sun.com from linux-i586.bin, from http://www.eclipse.org

Download eclipse3.0-sdk-linux-gtk.zip

It is best to download them to the/tmp directory first, then install j2sdk, copy Jsdk1.4.2-linux-i586.bin to/usr input under shell

Cp j2sdk1.4.2-linux-i586.bin/usr and then install

./J2sdk1.4.2-linux-i586.bin, The J2sdk1.4.2 directory appears in the usr directory after the command is executed

Set environment variables and enter the following commands in sequence:

Cd/etc

Vi profile open this file and add the following three sentences at the end of the file:

EXPORT JAVA_HOME =/usr/j2sdk1.4.2

Export path = & JAVA_HOME/bin: & PATH

Export classpath =.: & JAVA_HOME/lib/rt. jar: & JAVA_HOME/lib/tools. jar and save the file

In this way, we have installed js2dk. Note that the current directory should not be missed in the environment variables. we can write a test file to check it,

HelloWorld. java

Public class HelloWorld

{

Public static void main (String [] args)

{

System. out. println ("hello world in linux ");

}

}

Javac HelloWorld. java HelloWorld so that you can see the output of hello world in linux. This indicates that the installation is successful. Next we will install Eclipse3.0

Copy the downloaded file to/tmp, and then execute

Unzip eclipse-SDK-3.0-linux-gtk.zip to get the eclipse folder in the current directory

Cp-R eclipse/usr

Cd/usr/eclipse

./Eclipse we can see that eclipse is started, and he will ask where we put the workspace? You can decide on your own, and then write a HelloWorld project for testing. Generally, there is no problem. In this way, we have set up the java Development Environment in linux, but eclipse feels slower than windows.

Related Article

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.