Article Title: how to configure JDK in Fedora8Linux. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems and open source and some other basic categories 1. Download The jdk-6u4-linux-i586.bin to sun.com, suppose downloaded to the current user directory;
2. Create the software Directory under/home/abin and copy the jdk-6u4-linux-i586.bin to the software Directory;
3. find the terminal, go to/home/abin/software, Execute Command sh jdk-6u4-linux-i586.bin, the screen will show some protocol files, one way press enter, at last will recognize you confirm installation, enter yes, enter, wait a moment ......, A jdk1.6.0 _ 04 folder is generated under/home/abin/software. This is the jdk installation directory.
Okay. Set the jdk environment variable as follows:
4. If it is only for the current user, go to the current user directory (/home/abin) and edit it. Add the environment variable to the bashrc file as follows:
JAVA_HOME=/home/abin/software/jdk1.6.0_04 CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME CLASSPATH PATH
|
5. To allow all users to use the environment variables, log on as the root user, enter the/etc directory, and add the preceding environment variables at the end of the profile file.
Note: When setting environment variables, pay attention to the following points:
A) The first is the format of environment variables. previously set in windows to separate the paths with semicolons, and use colons in linux;
B) Second, check whether there are any variables to be set in the system. If yes, add ": $ variable name" to the variable with the same name. For example, if the PATH variable exists in the system, you must write PATH = $ JAVA_HOME/bin: $ PATH when setting the PATH variable. Otherwise, the last set content will overwrite the previous content.
To check whether a variable with the same name exists in the system, run the echo command in the following format: echo $ PATH
6. After the configuration is complete, enter java-version on the terminal to display the JDK version information, indicating that the installation is successful. Congratulations!