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.


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应用环境