Use default-java instead of a specific version.
Fix getlogin test -- it returns ENOTTY when there's no tty.