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)
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于