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.
- 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
- 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 built a Java Development Environment in Linux, but eclipse feels slower than Windows :(