Project exec with spaces in the JAVA_HOME?

Hi

I am trying to execute a Maven build from a Gradle by using

project.exec {

commandLine (args)

environment ( “JAVA_HOME” : project.javaHome)

} My problem at the moment is when the JAVA_HOME variable has spaces the process start fails is there a way to encode the JAVA_HOME property to support spaces ?

Thank you, Oscar

I guess you have to escape the java home path manually with quotes.

cheers, René

thank you, :slight_smile: