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.
I. Preparations
First, make sure that JDK is installed. Install JDK:
This article describes how to install and configure jdk5.0 in FC4.
1. Installation
First, go to the website] http://java.sun.com/j2se/1.5.0/download.jspto download the latest version of 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 JDK. Enter the folder where the downloaded file is located. Use root to log on and run the following command:
#./Jdk-1_5_0_06-linux-i586-rpm.bin
Then, JDK is automatically installed. 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 JDK and set 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:
# Set environment for Java
Export java_home =/usr/Java/jdk1.5.0 _ 06
Export Path = $ java_home/bin: $ path
Export classpath =.; $ java_home/lib
Save and launch. Log out and then log on again. In this case, 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:
Public class helloworld {
Public static void main (string [] ARGs ){
System. Out. println ("Hello World !");
}
}
Compile the file after saving:
$ Javac helloworld. Java
Then execute:
$ Java helloworld
If Hello world is successfully output! It indicates that the operation is successful!
So far, JDK configuration is successful, and various development is now available.
After JDK is installed successfully, you need to download the eclipse installation package and download the latest version at the following URL:
Http://www.eclipse.org/downloads/
Ii. installation:
After downloading the installation package, you can decompress and install it. Eclipse can be directly decompressed without installation. Run the following command to decompress the package:
Tar-zxvf eclipse-SDK-3.1.2-linxu-gtk.tar.gz/opt/eclipse
Decompress eclipse to the/OPT directory. You can also select the directory you like.
3. Start
The next step is to start eclipse. Go to the installation directory and run
$./Eclipse
You can start eclipse.
Then set the workspace as required. You can also write a simpleProgramTest whether it works well.
In this way, we are done. It is found that eclipse runs well in Linux, and both startup and shutdown are faster than windows.