The latest method for installing Java. Install JDK on Linux

Source: Internet
Author: User
For the latest Java installation method, install JDK on Linux-general Linux technology-Linux programming and kernel information. For details, refer to the following section. 1. Install JDK on Linux

The latest version of Java JDK (J2SE 1.3) already supports Linux, so Linux users can download the official version of JDK 1.3 from Sun's Java website.

Although Java is a cross-platform software, the installation methods on various platforms are slightly different. Here we will introduce the precautions for installation on the Linux operating system.

When you install JDK (Java Development Kit) or JRE (Java Runtime Environment), the default installation path of this Redhat package file is/usr/java. If you want to install it in another path, for example, in the/usr/local/home directory, the command to be installed is:
Rpm-I -- badreloc -- relocate/usr/java =/usr/local/home j2sdk_1_3_0-linux.rpm

After installation, All executable files are installed in the/bin subdirectory of the path. Add the directory to the original PATH of the account. If bash shell is used, the command is:
Export PATH =/usr/java/jdk1.3/bin: $ PATH

If you want to determine whether the setting is successful, just enter the java-version command to see if the correct version number is available.

After JRE is installed, Java Plug-in is automatically installed in the JRE directory. To allow Netscape Browser to find this Java Plug-in, we must specify the Environment Parameter NPX_PLUGIN_PATN to the file javaplugin. so directory. Command:
Export NPX_PLUGIN_PATH =/usr/java/jdk1.3/jre/plugin/i386

If you want to set the property of Java Plug-in, you just need to execute the Control Panel program. This program is located in the jre/bin directory.

If the above steps are successful, you can write Java programs, execute Java programs in Linux, and execute the latest Java Applets version in Netscape Browser.

   2. Install patches on Solaris

Friends who execute or develop Java programs on Sun Solaris's UNIX operating system must install some patches on the operating system to avoid some problems that may occur during Java program execution. The patch program is equivalent to the so-called "service pack" on Windows NT. It is used to correct some bugs in the operating system.

First, if you want to know which patches have been installed, run the following command:
Command showrev-p

If the patches recommended for installation below are not in the output list, you must download the related patches. If you are Sun's contracted user, you will receive a SunSolve disc on a regular basis, which contains the latest patch file.

For example, a friend using the latest J2SE 1.3 can go to the http://java.sun.com/j2se/1.3/README.sparc to query if you want to know which patches must be installed (to successfully execute the Java program. There are several tables for the patch list of different versions of Solaris. If you are using the latest Solaris 8, you only need to install the patch number 108940-07. All these patches can be downloaded for free from the SunSolve website.

After downloading a patch file, you must be a super user of the system to install the patch. First, extract and expand the patch:
Uncompress. tar. Z
Tar xfv. tar

It expands the file to a subdirectory named after the patch number. The detailed patch description can be found in the Install.info file. We recommend that you change the system to single-user mode by entering the "shutdown" command. Then, in single-user mode, run the patchadd command to install the patch file. The syntax is as follows:
Patchadd-M ......

After that, you can restart the system by executing the command shutdown-i6.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.