Another attempt to detect Java installation.