AppletLoader: fix JVM bug where '!' is not escaped on the URL, thanks to NateS for spotting it and special thanks to MatthiasM for the fix.

This commit is contained in:
kappa1 2011-03-13 14:54:36 +00:00
parent b3fdb66a3f
commit 7023a35bac

View file

@ -1009,7 +1009,10 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
URL[] urls = new URL[urlList.length];
for (int i = 0; i < urlList.length; i++) {
urls[i] = new URL("file:" + path + getJarName(urlList[i]));
String file = new File(path, getJarName(urlList[i])).toURI().toString();
// fix JVM bug where ! is not escaped
file = file.replaceAll("!", "%21");
urls[i] = new URL(file);
}
// add downloaded jars to the classpath with required permissions