Fedora Linux JDK is still quite common, So I studied the JDK process and shared it with you here. I hope it will be useful to you. 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.
Preparations
First, make sure that you have installed the Linux JDK. Install Linux JDK: This document describes how to install and configure JDK in FC4.
1. Installation
First, go to the website] http://java.sun.com/j2se/1.5.0/download.jspto download the latest version of Linux 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 Linux JDK. Enter the folder where the downloaded file is located. Log On with root and execute the following command: #./jdk-1_5_0_06-linux-i586-rpm.bin
Then, the Linux JDK will be installed automatically. 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 the Linux JDK and set the 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:
# Setenvironmentforjava
ExportJAVA_HOME =/usr/java/jdk1.5.0 _ 06
ExportPATH = $ JAVA_HOME/bin: $ PATH
ExportCLASSPATH =.; $ JAVA_HOME/lib
Save and launch. Log out and then log on again. 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:
PublicclassHelloWorld {publicstaticvoidmain (String [] args) {System. out. println ("HelloWorld !");}}
Compile the file after saving:
$ JavacHelloWorld. java
Then execute:
$ JavaHelloWorld: If HelloWorld is successfully output! It indicates that the operation is successful!
Now, the configuration of Linux JDK is successful, and you can perform various development tasks.
After installing the Linux JDK, You need to download the Eclipse installation package and download the latest version at the following URL:
Http://www.eclipse.org/downloads/
Install
After downloading the installation package for Linux JDK, You can decompress and install it. Eclipse can be directly decompressed without installation. Run the following command to decompress: tar-zxvfeclipse-SDK-3.1.2-linxu-gtk.tar.gz/opt/eclipse to unzip eclipse to the/opt directory, you can also choose your favorite directory.
Start
The next step is to start Eclipse. Go to the installation directory and run $./eclipse to start Eclipse.
Then set the workspace as required. You can also write a simple program to test whether the program runs well.
In this way, we are done. It is found that Eclipse runs well in Linux JDK, and both startup and shutdown are faster than Windows.
- How to decompress Linux compressed files
- Learn about Linux tar compressed files
- How to install realplayer in Linux
- Overview
- Analyze svn commands from Linux