ubuntu——How to Install Oracle Java JDK8
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 -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
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 300sudo update-alternatives --config java
java -version
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341