Properly check for JDK on both older and newer Ubuntus, print out a more explanatory message when not found

This reverts commit 542ee2698106099687970138fcbcc4d13ff8b035.