Check if the java binary can be found before launch.

Fix #386