ceylon/ceylon-compiler — comment on commit 0a6b400ad8712c3f550e8dd1792ce4e82e36b1a2
File:  line 0
By chochos:

There's already a script that finds or creates a JAVA_HOME variable if none's defined. But this addition is for when JAVA_HOME points to an invalid dir; if you just try to run %JAVA_HOME%\bin\java.exe you just get a vague error message from the operating system; this patch shows a clearer error message, telling you that your JAVA_HOME points to an invalid directory and even though it's defined, it's invalid.