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.
創新互聯公司科技有限公司專業互聯網基礎服務商,為您提供服務器機柜租賃,高防主機,成都IDC機房托管,成都主機托管等互聯網服務。
uname -a 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 x86_64 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-*
Unpack the compressed Java binaries, in the directory /usr/local/java8
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/profile
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
java -version
本文標題:ubuntu——HowtoInstallOracleJavaJDK8
網址分享:http://vcdvsql.cn/article32/pdeepc.html
成都網站建設公司_創新互聯,為您提供營銷型網站建設、響應式網站、外貿網站建設、微信小程序、品牌網站制作、微信公眾號
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯