ubuntu 普通用户可以使用java -version测试jdk,root用户无法测试,提示''以包含在以下软件包中
shf@shf-K42JP:~$java-versionjavaversion"1.8.0_131"Java(TM)SERuntimeEnvironment(build1...
shf@shf-K42JP:~$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
shf@shf-K42JP:~$ su root
密码:
root@shf-K42JP:/home/shf# java -version
程序 'java' 已包含在下列软件包中:
* default-jre
* gcj-5-jre-headless
* openjdk-8-jre-headless
* gcj-4.8-jre-headless
* gcj-4.9-jre-headless
* openjdk-9-jre-headless
请尝试:apt install <选定的软件包> 展开
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
shf@shf-K42JP:~$ su root
密码:
root@shf-K42JP:/home/shf# java -version
程序 'java' 已包含在下列软件包中:
* default-jre
* gcj-5-jre-headless
* openjdk-8-jre-headless
* gcj-4.8-jre-headless
* gcj-4.9-jre-headless
* openjdk-9-jre-headless
请尝试:apt install <选定的软件包> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询