diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java @@ -182,10 +182,6 @@ public class JNLPClassLoader extends URL /** Loader for codebase (which is a path, rather than a file) */ private CodeBaseClassLoader codeBaseLoader; - - /** True if the jar with the main class has been found - * */ - private boolean foundMainJar= false; /** Name of the application's main class */ private String mainClass = null; @@ -551,9 +547,6 @@ public class JNLPClassLoader extends URL if(allSigned) signing = true; - //Check if main jar is found within extensions - foundMainJar = foundMainJar || hasMainInExtensions(); - return; } /* @@ -628,17 +621,9 @@ public class JNLPClassLoader extends URL // Check for main class in the downloaded jars, and check/verify signed JNLP fill checkForMain(initialJars); + + boolean foundMainJar = (findLoadedClassAll(mainClass) != null); - // If jar with main class was not found, check available resources - while (!foundMainJar && available != null && available.size() != 0) - addNextResource(); - - // If the jar with main class was not found, check extension - // jnlp's resources - foundMainJar = foundMainJar || hasMainInExtensions(); - - // If jar with main class was not found and there are no more - // available jars, throw a LaunchException if (file.getLaunchInfo() != null) { if (!foundMainJar && (available == null || available.size() == 0)) @@ -647,6 +632,7 @@ public class JNLPClassLoader extends URL R("LCantDetermineMainClassInfo")); } + // If main jar was found, but a signed JNLP file was not located if (!isSignedJNLP && foundMainJar) file.setSignedJNLPAsMissing(); @@ -794,7 +780,6 @@ public class JNLPClassLoader extends URL je = entries.nextElement(); String jeName = je.getName().replaceAll("/", "."); if (jeName.equals(desiredJarEntryName)) { - foundMainJar = true; verifySignedJNLP(jars.get(i), jarFile); break; } @@ -834,26 +819,6 @@ public class JNLPClassLoader extends URL } /** - * Returns true if this loader has the main jar - */ - public boolean hasMainJar() { - return this.foundMainJar; - } - - /** - * Returns true if extension loaders have the main jar - */ - private boolean hasMainInExtensions() { - boolean foundMain = false; - - for (int i = 1; i < loaders.length && !foundMain; i++) { - foundMain = loaders[i].hasMainJar(); - } - - return foundMain; - } - - /** * Is called by checkForMain() to check if the jar file is signed and if it * contains a signed JNLP file. *