System: Linux Redhat as3 update3
Package: j2sdk-1_4_2_05-linux-i586.bin
Installation Process:
1. copy the file to the/tmp directory.
----/Note: CP j2sdk-1_4_2_05-linux-i586.bin/tmp
2. Execute the file
---- // Note:./j2sdk-1_4_2_05-linux-i586.bin
---- // Note/There is a dot above ".")
The copy Object List is displayed. By default, JDK is installed in the/usr/Java/j2sdk1.4.2 _ 05 directory.
3. Set Java environment variables
Use VI to edit the profile file
---- // Note: The file is in the/etc directory.
---- // Note: VI/etc/profile
Add the following content at the end:
Export java_home =/usr/Java/j2sdk1.4.2 _ 05
Export Path =/usr/Java/j2sdk1.4.2 _ 05/bin: $ path
Export classpath =.:/usr/Java/j2sdk1.4.2 _ 05/lib/tools. jar:/usr/Java/j2sdk1.4.2 _ 05/lib: $ classpath
Save the disk and exit (the paths of different versions will be different. Please change the paths according to your actual situation)
4. Execute the following command in the command line to make it take effect:
---- // Note: Source/etc/profile
5. If you want other users to use Java, log on with another user account, and then tap the above command under the command line
---- // Note: Source/etc/profile
6. Run the following command to test the job, or press Java to view the help of the command.
---- // Note: Which Java (displays relevant information)
Note: My Linux Redhat as3 selects full installation, according to the installation documentation on the Internet, it is found that the so file in the/usr/Java/j2sdk1.4.2 _ 05/JRE/lib/i386 directory is always not found after Java is executed (but actually exists ). After the environment variable settings are removed, the Java command is used to display other irrelevant information (for another command). Originally, the built-in command is used first, therefore, you must put the JDK path in front of the path setting.
Installing JDK on this system may be fine (it is written in the log of another bloger ). The software versions described in many articles on the Internet are relatively low, so it is difficult to understand various problems during operations.
Thanks to those blogs who have recorded their use process.