Step-by-Step: Build a Java Development Environment in Linux

Source: Internet
Author: User
Tags gtk

Sometimes you may 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. Final use of eclipse3.0

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

  1. First download j2sdk1.4.2-http://java.sun.com from linux-i586.bin, download eclipse3.0-sdk-linux-gtk.zip from http://www.eclipse.org
  2. 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
  3. 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
  4. 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
  5. 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 built a 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.