go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Manually Install Oracle JDK
 
Subject: Manually Install Oracle JDK
Author: Linux
In response to: Install the Oracle JDK
Posted on: 10/20/2017 12:34:44 AM

Step 1) Download the Oracle JDK package

There are two packages available for Linux: .rpm and .gz. Here, .gz is taken as example.

Download a JDK from http://download.java.net/. Look for ".gz" under "Linux" and download to local Windows machine.

Step 2). Make the folder available

$ sudo mkdir /usr/local/java
$ cd /usr/local/
$ sudo chmod 777 java


Step 3). Upload the downloaded JDK by WinSCP

Copy jdk-8u152-linux-x64.tar.gz onto /usr/local/java/

Step 4). Unzip the package
$ tar xzf jdk-8u152-linux-x64.tar.gz


The JDK content is under folder jdk1.8.0_152

Step 5). Install JDK Linkage

Format:
$ update-alternatives --install <link> <name> <path> <priority>


$ sudo update-alternatives --install /usr/bin/java java /usr/local/java/jdk1.8.0_152/bin/java 100
$ sudo update-alternatives --install /usr/bin/jar jar /usr/local/java/jdk1.8.0_152/bin/jar 100
$ sudo update-alternatives --install /usr/bin/javac javac /usr/local/java/jdk1.8.0_152/bin/javac 100


 

> On 10/20/2017 12:11:43 AM Linux wrote:

First, add Oracle's PPA, then update your package repository
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update


Then specify the version you want to install

JDK 8
$ sudo apt-get install oracle-java8-installer


or JDK 9

$ sudo apt-get install oracle-java9-installer


http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/
jdk-8u144-linux-x64.tar.gz?AuthParam=1508369709_cd8d89c9ea21969593c7114b6684b14b
Connecting to download.oracle.com (download.oracle.com)|23.72.38.162|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-18 16:33:09 ERROR 404: Not Found.

download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)


That's not right which means the auto process (apt-get install) is broken. We have to go the manual way.





References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.