Ubuntu 18.04 install JDK8.201

Posted Alex Blog

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu 18.04 install JDK8.201相关的知识,希望对你有一定的参考价值。

  1. sudo add-apt-repository ppa:webupd8team/java
    1. Press Enter to continue.
  2. sudo apt update
  3. sudo apt install oracle-java8-installer


Issues:

  • subprocess installed post-installation script returned error exit status 1

Solutions:

  1. cd /var/lib/dpkg/info
  2. sudo sed -i \'s|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_201|\' oracle-java8-installer.*
  3. sudo sed -i \'s|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/|PARTNER_URL=https://download.oracle.com/otn-pub/java/jdk/8u201-b09/42970487e3af4f5aa5bca3f542482c60/|\' oracle-java8-installer.*
  4. sudo sed -i \'s|SHA256SUM_TGZ="640333e749f24428b78c2b10422f7174f8fbd0b8acde27526c195024fad8b6b6"|SHA256SUM_TGZ="12c745fbb8735bf450b8c6ba6f649bebe19915f05742975e443bdc8566170352"|\' oracle-java8-installer.*
  5. sudo sed -i \'s|J_DIR=jdk1.8.0_191|J_DIR=jdk1.8.0_201|\' oracle-java8-installer.*
  6. Than reinstall
    1. sudo apt install oracle-java8-installer
    2. sudo apt install oracle-java8-set-default
    3. java –version



Reference:

  1. https://www.cnblogs.com/VeryGoodVeryGood/p/8318105.html
  2. www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

以上是关于Ubuntu 18.04 install JDK8.201的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu 18.04 install clang 11

ubuntu 18.04 install docker

ubuntu18.04 install pip

Installing Ubuntu 18.04 by USB flash drive

Ubuntu18.04下安装配置AndroidStudio软件图文教程

---qtcreator installation under Ubuntu 18.04