如何检查java安装好了吗,如何检查安装了哪个Java版本

The chef client already has java installed on it. How can I check which version of java is installed using chef. I know I can write a small ohai plugin to do the same but is there any other way to check which java version is installed on the client? The java installation is not an rpm installation though on some endpoints it might be an rpm installation.

解决方案

However this is complicated because you can have multiple Java installs in parallel as long as you set $JAVA_HOME and whatnot for each application, and there is no overall standard for JVM file locations, so if you think you might have multiple versions or just one version but off $PATH you'll need to use code similar to the Ohai plugin in your own recipe (or your own Ohai plugin if you wanted to get fancy).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值