Check if Java is installed and throw error to user if socket.error is raised