diff --git a/core/src/main/resources/hudson/slaves/JNLPLauncher/main.jelly b/core/src/main/resources/hudson/slaves/JNLPLauncher/main.jelly index cd294f04d6..1e99285e5c 100644 --- a/core/src/main/resources/hudson/slaves/JNLPLauncher/main.jelly +++ b/core/src/main/resources/hudson/slaves/JNLPLauncher/main.jelly @@ -57,7 +57,7 @@ THE SOFTWARE.
${%Or if the slave is headless:}
-java -jar slave.jar -jnlpUrl ${h.inferHudsonURL(request)}${it.url}slave-agent.jnlp
+ java${it.launcher.vmargs == null ? '' : ' ' + it.launcher.vmargs} -jar slave.jar -jnlpUrl ${h.inferHudsonURL(request)}${it.url}slave-agent.jnlp
java -jar slave.jar -jnlpUrl ${h.inferHudsonURL(request)}${it.url}slave-agent.jnlp -secret ${it.jnlpMac}
+ java${it.launcher.vmargs == null ? '' : ' ' + it.launcher.vmargs} -jar slave.jar -jnlpUrl ${h.inferHudsonURL(request)}${it.url}slave-agent.jnlp -secret ${it.jnlpMac}