diff options
-rw-r--r-- | src/core/lombok/core/Main.java | 2 | ||||
-rw-r--r-- | src/launch/lombok/launch/ShadowClassLoader.java | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/core/lombok/core/Main.java b/src/core/lombok/core/Main.java index 0856d3b3..dc613b0d 100644 --- a/src/core/lombok/core/Main.java +++ b/src/core/lombok/core/Main.java @@ -143,7 +143,7 @@ public class Main { out.println("------------------------------"); } out.println("projectlombok.org " + Version.getFullVersion()); - out.println("Copyright (C) 2009-2012 The Project Lombok Authors."); + out.println("Copyright (C) 2009-2015 The Project Lombok Authors."); out.println("Run 'lombok license' to see the lombok license agreement."); out.println(); out.println("Run lombok without any parameters to start the graphical installer."); diff --git a/src/launch/lombok/launch/ShadowClassLoader.java b/src/launch/lombok/launch/ShadowClassLoader.java index 79809b2f..b883bd71 100644 --- a/src/launch/lombok/launch/ShadowClassLoader.java +++ b/src/launch/lombok/launch/ShadowClassLoader.java @@ -211,24 +211,26 @@ class ShadowClassLoader extends ClassLoader { if (!location.isFile() || !location.canRead()) return null; - String absolutePath; { + File absoluteFile; { try { - absolutePath = location.getCanonicalPath(); + absoluteFile = location.getCanonicalFile(); } catch (Exception e) { - absolutePath = location.getAbsolutePath(); + absoluteFile = location.getAbsoluteFile(); } } - List<String> jarContents = getOrMakeJarListing(absolutePath); + List<String> jarContents = getOrMakeJarListing(absoluteFile.getAbsolutePath()); + + String absoluteUri = absoluteFile.toURI().toString(); try { if (jarContents.contains(altName)) { - return new URI("jar:file:" + absolutePath + "!/" + altName).toURL(); + return new URI("jar:" + absoluteUri + "!/" + altName).toURL(); } } catch (Exception e) {} try { if (jarContents.contains(name)) { - return new URI("jar:file:" + absolutePath + "!/" + name).toURL(); + return new URI("jar:" + absoluteUri + "!/" + name).toURL(); } } catch(Exception e) {} |