src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassCollector.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassCollector.java
src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassCollector.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 204,215 ****
throw new InternalError(e);
}
}
private URI makeJarFileURI(String fileName) {
try {
! return new URI("jar:file:" + Paths.get(fileName).toAbsolutePath() + "!/");
} catch (URISyntaxException e) {
throw new InternalError(e);
}
}
--- 204,217 ----
throw new InternalError(e);
}
}
private URI makeJarFileURI(String fileName) {
+ String name = Paths.get(fileName).toAbsolutePath().toString();
+ name = name.replace('\\', '/');
try {
! return new URI("jar:file:///" + name + "!/");
} catch (URISyntaxException e) {
throw new InternalError(e);
}
}
*** 250,260 ****
log.printlnVerbose(" loaded " + name);
}
}
private URL[] buildUrls(String fileName) throws MalformedURLException {
! return new URL[]{ new URL("jar:file:" + Paths.get(fileName).toAbsolutePath() + "!/") };
}
private URL[] buildUrls(File file) throws MalformedURLException {
return new URL[] {file.toURI().toURL() };
}
--- 252,264 ----
log.printlnVerbose(" loaded " + name);
}
}
private URL[] buildUrls(String fileName) throws MalformedURLException {
! String name = Paths.get(fileName).toAbsolutePath().toString();
! name = name.replace('\\', '/');
! return new URL[]{ new URL("jar:file:///" + name + "!/") };
}
private URL[] buildUrls(File file) throws MalformedURLException {
return new URL[] {file.toURI().toURL() };
}
*** 272,281 ****
--- 276,286 ----
if (fileName.startsWith("/")) {
start = 1;
}
String className = fileName.substring(start, fileName.length() - ".class".length());
className = className.replace('/', '.');
+ className = className.replace('\\', '.');
try {
return loader.loadClass(className);
} catch (Throwable e) {
// If we are running in JCK mode we ignore all exceptions.
if (options.ignoreClassLoadingErrors) {
src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/ClassCollector.java
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File