LINUX installation under JDK1.5 installation

xiaoxiao2021-03-14  179

1. First, download JDK1.5 installation files from Sun, generally there are two types. Download address: http://java.sun.com/j2se/1.5.0/download.jsplinux rpm in self-extracting file (JDK-1_5_0-linux-i586-rpm.bin, 42.50 MB) Linux Self-extracting file JDK-1_5_0-linux-i586.bin, 43.95 MB) Briefly tell the difference between the two installation files, Linux rpm in self-extracting file is a binary format that encapsulates the RPM installation package in the compressed package, in the Linux operating system Under the command line, apply the permissions executed by the file CHMOD A X JDK-1_5_0-Linux-i586-rpm.bin, then ./jdk- 1_5_0-linux-i586-rpm.bin can be obtained after JDK-1_5_0-Linux- I586.rpm This RPM package, after installing the RPM package, use more? RPM? IVH Package-name. The benefits of the former are easy to install and maintain, fools. The latter is suitable for advanced users, equivalent to a ZIP version of "Green" JDK, no installation, you may need to do some links after installation (specifically you can refer to the JDK Installation Guide document). Similarly, it can be directly executed to the latter to perform the binary, and the JDK 1.5.0 can be performed directly. The usual user habits are put JDK under / usr / java, and the RPM is installed by default to / usr / java. 2. The installation is installed is the setting of environment variables, or it can be divided into two different situations. The first is set for a single user's environment variable. You need to modify the .bash_profile file corresponding to the user. We can edit the current user's Bash_Profile file via vi ~ / .bash_profile, of course you can also use your own editor. Insert the code at the beginning or appropriate place: export java_home = / usr / java / jdk1.5.0export classpath = .Export path = java_home / bin: $ PATH and save the file, enter Java under the console after logging out of the Console? Version, if there is any information, the installation setting has been successful. Note: This code is simple, so there is no complex variable reference, and the user who is familiar with the shell can be modified according to the code of the second method. Java Version "1.5.0" Java (TM) 2 Runtime Environment, Standard Edition (Build 1.5.0-B64) Java Hotspot (TM) Client VM (Build 1.5.0-B64, Mixed Mode, Sharing)

The second is to set the global environment variable of Linux (need ROOT permissions), modify / etc / profile, add the following code in the appropriate place: java_home = / usr / java / jdk1.5.0path = $ java_home / bin: $ pathclasspath = : $ Java_home / lib / Tools.jar: $ java_home / lib / dt.jager_home / lib / dt.jaarexport path java_home classpath After the completion is saved, logout the current user will be tested in accordance with the first same way to test whether it is successful. At this point, the basic installation and environment variable settings have been completed.

转载请注明原文地址:https://www.9cbs.com/read-129335.html

New Post(0)