From 7023a35bac70e3c14f6aeac7ecdc6370cd8a4b07 Mon Sep 17 00:00:00 2001 From: kappa1 Date: Sun, 13 Mar 2011 14:54:36 +0000 Subject: [PATCH] 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. --- src/java/org/lwjgl/util/applet/AppletLoader.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/java/org/lwjgl/util/applet/AppletLoader.java b/src/java/org/lwjgl/util/applet/AppletLoader.java index 4751a19e..2c30dc3d 100644 --- a/src/java/org/lwjgl/util/applet/AppletLoader.java +++ b/src/java/org/lwjgl/util/applet/AppletLoader.java @@ -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