Improving Java installation detection