Install JDK in Ubuntu

Source: Internet
Author: User
Install JDK in Ubuntu in detail. We chose JDK 1.6.0 _ 30. Installation File Name Is jdk-6u30-linux-i586.bin.1, copy jdk to installation directory (1) Suppose jdk installation file on the desktop, we specify the installation directory is:/usr/local/java. However, after the system is installed, there is no java directory under/usr/local. We need to create a java folder, (1) (2) switch to the desktop

Install JDK in Ubuntu in detail. We chose JDK 1.6.0 _ 30. The Installation File Name Is jdk-6u30-linux-i586.bin.

1. Copy jdk to the installation directory

(1) assume that the jdk installation file is on the desktop. The specified installation directory is/usr/local/java. However, after the system is installed, there is no java directory under/usr/local, so we need to create a java folder, (1)

(2) switch to the desktop and perform replication. (2)

2. Install jdk

(1) switch to the root user (3)

(Note: If the authentication fails because the password is forgotten, you can first modify the password of the root user, and then perform step (1) to modify the password of the root user (4 ))

(2) run the jdk-6u30-linux-i586.bin, (5)

(Note: You may still not have the execution permission at this time, because in linux, the default file permission is 644, and even the owner does not have the execution permission. In this case, you need to change the permission, if you want to know the permissions of a file, you can go to the folder where the file is located and execute the command ls-la to view it. Here, we change the permissions of the jdk-6u30-linux-i586.bin file to 777, that is, the owner user of the file, the group user and other users have all permissions on the file, of course, it is not recommended to set permissions on the files in the system, this damages the security of linux .)

Change jdk-6u30-linux-i586.bin permissions, (6)

After changing the permission, execute step (2). When you see the situation, the installation is successful.

(3) In this case, a jdk1.6.0 _ 30 folder is added to the/usr/local/java directory. For details, see (8)

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.