How to check which java version is installed
问题 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. 回答1: We already attempt to query it in Ohai for you: https://github.com/chef/ohai/blob/master/lib/ohai/plugins/java.rb However this is