Matthew Lowe Matthew Lowe - 1 year ago 87
Groovy Question

Groovy - get JAVA_HOME from program

I need to obtain JAVA_HOME property from Groovy (Gradle), does anyone know how to achieve this? Only way I can think of is somehow executing this from cmd line via Exec.

(I'm running Windows btw :))

Answer Source { it.key == "java.home" }