JDK Installation Instructions

Source: Internet
Author: User


 1. LinuxIn the environmentJdkthe installation steps1.1 UploadJdk-7u75-linux-x64.tar.gzand Unzip

1. Upload the downloaded jdk-7u75-linux-x64.tar.gz file to a Linux server , or download it online using wget .

2. pressurized jdk-7u75-linux-x64.tar.gz.

the extracted commands are : TAR–ZXVF jdk-7u75-linux-x64.tar.gz

the extracted file directory structure is:

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" height= "183" width= "554" alt= "Spacer.gif"/>

1.2 SetPATH

1. Create the Java directory under the /usr/local/ directory . command for Mkdir/usr/local/java

2. move the extracted java/jdk1.7.0_75 directory including all the files in the directory to /usr/local/java/

the Copy command is : MV. /jdk1.7.0_75/usr/local/java/

3. Modify profile settings PATH

Execute command : vi/etc/profile

Append the contents to the end of the file:

1. Export java_home=/usr/local/java/jdk1.7.0_75

2. Export Jre_home=/usr/local/java/jdk1.7.0_75/jre

3. export path= $PATH:/usr/local/java/jdk1.7.0_75/bin

4. Export Classpath=./:/usr/local/java/jdk1.7.0_75/lib:/usr/local/java/jdk1.7.0_75/jre/lib

input : Wq exit and save, then restart Linux system

1.3 Verifying the installation results

after restarting the system, enter:java-version, if you see the following instructions your JDK has been installed successfully.

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" height= "" "width=" 506 "alt=" Spacer.gif "/>

2. problems that you may encounter

2.1 to uninstall first before installingCentosSelf-installingJdk

[email protected] soft]# java-version
Java Version "1.4.2″
Gij (GNU libgcj) version 4.1.2 20071124 (Red Hat 4.1.2-42)
Note that according to my5.2installed under the circumstances, does not seem to uninstall the self-brought1.4, setJdk6installation is not valid. In order to avoid this situation, we will first uninstall its own1.4version ofJDK.

[Email protected] soft]# Rpm-qa | grep JDK
[Email protected] soft]# Rpm-qa | grep GCJ
Libgcj-4.1.2-42.el5
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
Check it first . JDK the specific version number, and then

[email protected] jdk1.6.0_11]# yum-y removejava-1.4.2-gcj-compat-1.4.2.0-40jpp.115
Setting up Remove Process
Resolving Dependencies ...... (Start Uninstallation)
Removed:java-1.4.2-gcj-compat.i386 0:1.4.2.0-40jpp.115
Dependency Removed:antlr.i386 0:2.7.6-4jpp.2 bsf.i386 0:2.3.0-11JPP.1 BSH.I3860:1.3.0-9JPP.1 gjdoc.i386 0:0.7.7-12.el5 hsqldb.i386 1:1.8.0.9-1jpp.2openoffice.org-calc.i386
1:2.3.0-6.5.el5 Openoffice.org-core.i386 1:2.3.0-6.5.el5openoffice.org-draw.i386 1:2.3.0-6.5.el5 Openoffice.org-graphicfilter.i3861:2.3.0-6.5.el5 openoffice.org-impress.i386
1:2.3.0-6.5.el5 Openoffice.org-langpack-zh_cn.i386 1:2.3.0-6.5.el5openoffice.org-langpack-zh_tw.i386 1:2.3.0-6.5.el5 Openoffice.org-math.i3861:2.3.0-6.5.el5 openoffice.org-
writer.i386 1:2.3.0-6.5.el5 Openoffice.org-xsltfilter.i386 1:2.3.0-6.5.el5tomcat5-jsp-2.0-api.i386 0:5.5.23-0jpp.7.el5 Tomcat5-servlet-2.4-api.i3860:5.5.23-0jpp.7.el5 xalan-
j2.i386 0:2.7.0-6jpp.1 xerces-j2.i386 0:2.7.1-7JPP.2 xml-commons-apis.i3860:1.3.02-0.b2.7jpp.10 xml-commons-resolver.i386 0:1.1-1jpp.12
Complete! (Uninstall Complete)


JDK Installation Instructions

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.