What is the correct target for the JAVA_HOME environment variable for a Linux OpenJDK Debian-based distribution?
What finally worked for me (Grails now works smoothly) is doing almost like Steve B. has pointed out: JAVA_HOME=/usr/lib/jvm/default-java This way if the user changes the default JDK for the system, JAVA_HOME still works. default-java is a symlink to the current JVM.