Project exec with spaces in the JAVA_HOME?


(Luis Trigueiros) #1

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


(René Groeschke) #2

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

cheers, René


(Luis Trigueiros) #3

thank you, :slight_smile: