我正在使用VMware Workstation Pro运行Ubuntu 17.10.1,我想要完成的第一项任务是安装jdk-8u161-linux-arm64-vfp-hflt.tar.gz
。为此,我遵循了以下步骤:
/usr/lib/java
目录中。执行以下命令:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/java/jdk1.8.0_161/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/java/jdk1.8.0_161/bin/javac" 1
使用以下三个语句更新了.bashrc
文件:
export JAVA_HOME=/usr/lib/java/jdk1.8.0_161
set PATH="$PATH:$JAVA_HOME/bin"
export PATH
关闭并重新打开终端并解除命令:java -version
现在我收到以下错误:
The program 'java' can be found in the following packages:
* default-jre
* openjdk-8-jre-headless
* gcj-4.8-jre-headless
* gcj-5-jre-headless
* gcj-6-jre-headless
* openjdk-9-jre-headless
Try: sudo apt install <selected package>
我在这里遗漏了什么?需要帮助..