Step tutorial for installing Java 8 under ubuntu

  • 2020-05-17 07:26:58
  • OfStack

preface

Oracle JAVA 8 is not available in the Ubuntu official source and can be installed by adding an PPA repository.

The first idea is to go to the official website to have a look at it. However, the official website download address cannot be downloaded through wget, which is very embarrassing. Therefore, I installed it in the following way. Friends in need 1 take a look.

Installation method:

Add PPA warehouse and install:


$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

Verify that the Java version is installed


rahul@tecadmin:~$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Configure environment variables


$ sudo apt-get install oracle-java8-set-default
 In this way, Oracle Jave 8 The environment was installed successfully. 

conclusion

The above is all about installing Java 8 in ubuntu. I hope the content of this article can help you in your study or work. If you have any questions, please leave a message to communicate.


Related articles: