ZipFile.name trick did not work, using fallback: java.lang.NullPointerException (#6757)

This commit is contained in:
Basil Crow authored and GitHub committed 2022-07-03 18:26:26 -07:00
1 parent 023815656a
commit 2d70e77132
1 file changed
+1 -1
+1 -1
View File
@@ -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) {