ubuntu上安装oracle java应用环境

  |   0 评论   |   0 浏览

3. Installing Oracle JRE

Downloading JRE Binaries

Download JRE binaries in .tar.gz (tarball) by heading over to their website.

Installing

Create a directory to install JRE in with:

sudo mkdir /usr/local/java

Move the JRE binaries into the directory:

sudo mv jre-8u151-linux-x64.tar.gz /usr/local/java

Go into the install directory:

cd /usr/local/java

Unpack the tarball:

sudo tar zxvf jre-8u151-linux-x64.tar.gz

Post-installation steps

To save space, delete the tarball by running:

sudo rm jre-8u151-linux-x64.tar.gz

Let the system know where JRE is installed:

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre1.8.0_151/bin/java" 1

After that’s done, check the installation by running:

java -version

It should output the following:

java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

标题:ubuntu上安装oracle java应用环境
作者:SmiteLi
地址:https://smite.site/articles/2020/02/17/1581924315973.html