Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ubuntu--How to Install Oracle Java JDK8

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Check to see if your Ubuntu Linux operating system architecture is 32-bit or 64-bit, open up a terminal and run the following command below.

Uname-an or file / sbin/init

Linux caochu-Inspiron-N5110 3.13.0-32-generic # 57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86 "64 GNU/Linux

Check if you have Java installed on your system. To do this, you will have to run the Java version command from terminal.Type/Copy/Paste:java-versio

If you have OpenJDK installed on your system, you have the wrong vendor version of Java installed for this exercise.

Sudo apt-get purge openjdk-*Download the Oracle Java JDK for Linux.

Unpack the compressed Java binaries, in the directory / usr/local/java8

Scroll down to the end of the file using your arrow keys and add the following lines below to the end of your./etc/profile file: export JAVA_HOME=/usr/local/java8/jdk1.8.0_73 export JRE_HOME=$ {JAVA_HOME} / jre export CLASSPATH=.:$ {JAVA_HOME} / lib:$ {JRE_HOME} / lib export PATH=$ {JAVA_HOME} / bin:$PATH source / etc/profileConfigure default JDK version:

Sudo update-alternatives-install / usr/bin/java java / usr/local/java8/jdk1.8.0_73/bin/java 300

Sudo update-alternatives-install / usr/bin/javac javac / usr/local/java8/jdk1.8.0_73/bin/javac 300

Sudo update-alternatives-install / usr/bin/jar jar / usr/local/java8/jdk1.8.0_73/bin/jar 300

Sudo update-alternatives-install / usr/bin/javah javah / usr/local/java8/jdk1.8.0_73/bin/javah 300

Sudo update-alternatives-install / usr/bin/javap javap / usr/local/java8/jdk1.8.0_73/bin/javap 300

Sudo update-alternatives-config java

Testjava-version

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report