Linux Common (a) Linux installation configuration JDK installed after installation can not find the file directory resolved

Source: Internet
Author: User
Tags file copy java se

Linux installation configuration JDK should be considered a very basic thing. But I am only now the first time to formally install. Sure enough, there was a problem.


The problem is that the installation path cannot be found after installation, and environment variables cannot be configured.


The phenomenon is as follows:


Tip already installed use the Find command to find the result or:


No directories such as/usr/java/jdk-1.6.0_27/are displayed


It's been a long time, and there's no other way to see. The installed package has a. The bin also has. RPM so decided to first understand what the difference between the two formats


Tidy up as follows:

As with the bin file and the Windows EXE, the executable file can be run directly, called Binary package (binary).

RPM is like a rar, whether it is willing or not, in the same place rpm command to compile the installation can be used.


The resources are as follows:

Some Linux software is unfair to open source code, only the binary executable program, such programs are generally marked with bin;


Another type of software is the binary installer and the source code is published together, the binary program file with the bin.rpm tag (in the case of Redhat package), the source code to source.rpm tag.
Bin is a binary file that can be run directly, RPM is the package manager used by Red Hat Company,


After figuring out the difference, I want to delete all of the previous packages from the official website next to the bin file directly install and try again.


In this case, when you need to download what software from the official website is the best of the other messy download is not the point of some may be false.

So direct search official website simple direct accurate. Also do not shout in various groups of people generally will not talk to you to find resources is also the ability to reflect.


The following paste from Baidu to find the process:


The first one is the link to the Oracle website. General Search page come on, don't rush in. Links

Look at each of the link description information and Baidu Snapshot address (red box place)

You can save time on filtering information

1)

2)

Click the first link to go to the following page:



Above

The meaning of the first red box Java SE 6u45 is jdk1.6 not available on the current page (or the homepage of the download)

The second meaning is if you want to access the Java Archive Page link in the old version of the JDK

The third meaning is if you don't move. The current page jumps to the Java se download page after 9s (Download homepage only up-to-date jdk)


Click the Java Archive page link to jump to the page:




Click on the Java SE 6 page to jump to:



Click on the above accept license Agreement then you can click on the red box above to download the Linux version for your machine download. bin file

After clicking, you will see the following page that lets you log in:





If you do not have an account, create an account, this is no different from the usual registered user name, do not see this thing off.

You can download it once you've created it.



Here are my installation steps:

Well, this is my installation step.


1. Download Jdk-6u45-linux-x64.bin from Oracle

Download file: Jdk-6u45-linux-x64.bin

2. Copy the Jdk-6u45-linux-x64.bin into the/usr/java

3 Enter the/usr/java directory, modify the Jdk-6u45-linux-x64.bin executable permissions chmod +x jdk-6u45-linux-x64.bin

4. Executive Jdk-6u45-linux-x64.bin

./jdk-6u45-linux-x64.bin for installation

5. Enter/etc/profile to configure the environment variable

6. Set the environment variables and add the following lines at the end
Export java_home=/usr/java/jdk1.6.0_45
Export Jre_home= $JAVA _home/jre
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib/rt.jar
Export path= $PATH: $JAVA _home/bin:/usr/java/jvmtop

(Note that the environment variables in Linux are split with ":", not ";")

7.source/etc/profile

Make the profile file effective

Result Error:

Syntax error:unexpected end of File


From the Internet to find the reason some said the end of the file has a newline character to be deleted, but I looked for a while do not know how to delete and do not know whether it is the reason, so it


This file copy of the target machine can be overwritten by the source successfully from another machine.

The results were successful:




At this point, the problem is resolved.

To summarize this type of installation configuration problem Resolution:

1 information as far as possible from the official website to obtain

2 Encounter the error long time can not solve, to calm, and the right thing to compare.

Linux Common (a) Linux installation configuration JDK installed after installation can not find the file directory resolved

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.