mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-03 15:15:54 +00:00
ZipFile.name trick did not work, using fallback: java.lang.NullPointerException (#6757)
This commit is contained in:
1 parent
023815656a
commit
2d70e77132
1 file changed
+1
-1
@@ -424,7 +424,7 @@ public class Main {
|
||||
// There is no portable way to find where the locally cached copy
|
||||
// of jenkins.war/jar is; JDK 6 is too smart. (See JENKINS-2326.)
|
||||
try {
|
||||
URL classFile = Main.class.getClassLoader().getResource("Main.class");
|
||||
URL classFile = Main.class.getClassLoader().getResource("executable/Main.class");
|
||||
JarFile jf = ((JarURLConnection) classFile.openConnection()).getJarFile();
|
||||
return new File(jf.getName());
|
||||
} catch (Exception x) {
|
||||
|
||||
Reference in new issue
Block a user