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.