I have written a new recipe for installing java from the rpm provided by
oracle. It assumes that you have a private repository where you have placed
the rpm
Should I try to put this in the java::sun recipe or a new recipe?
java::oracle-yum recipe
package ‘jdk’ do
action :install
end
ruby_block “update_alternatives” do
block do
jdk_home = %x[ rpm -qi jdk | grep ‘Relocations:’ ].split(/\s/)[-1] +
"/default"
%x[ update-alternatives --install /usr/bin/java java
#{jdk_home}/bin/java 1 ]
%x[ update-alternatives --set java #{jdk_home}/bin/java ]
end
end