diff --git a/core/src/main/java/hudson/model/Slave.java b/core/src/main/java/hudson/model/Slave.java
index 2e6ce11b9d..ee7b6be873 100644
--- a/core/src/main/java/hudson/model/Slave.java
+++ b/core/src/main/java/hudson/model/Slave.java
@@ -316,8 +316,8 @@ public final class Slave implements Node, Serializable {
/**
* Serves jar files for JNLP slave agents.
*/
- public JnlpJar getJnlpJars(String fileName) {
- return new JnlpJar(fileName);
+ public JnlpJar getJnlpJars(String fileNamePlusJar) {
+ return new JnlpJar(fileNamePlusJar.substring(0,fileNamePlusJar.length()-4)); // remove .jar
}
@Override
diff --git a/core/src/main/resources/hudson/model/Slave/ComputerImpl/slave-agent.jnlp.jelly b/core/src/main/resources/hudson/model/Slave/ComputerImpl/slave-agent.jnlp.jelly
index 0cf5232204..1bf13bc0fb 100644
--- a/core/src/main/resources/hudson/model/Slave/ComputerImpl/slave-agent.jnlp.jelly
+++ b/core/src/main/resources/hudson/model/Slave/ComputerImpl/slave-agent.jnlp.jelly
@@ -3,6 +3,9 @@
+
-
-
+
+