Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/test/JDJSTPTestcase.java
Original file line number Diff line number Diff line change
Expand Up @@ -2649,7 +2649,7 @@ public static void refreshLocalFile(String localFile) throws Exception {
// Determine if the local file needs to be extracted from the classpath
//
// Get the URL of the resource inside the JAR file
URL url = JDJSTPTestcase.class.getResource(localFile);
URL url = JDJSTPTestcase.class.getResource("/"+localFile);
File file = new File(localFile);
long currentTime = file.lastModified();
long lastJarModifiedMs = 0;
Expand All @@ -2658,9 +2658,10 @@ public static void refreshLocalFile(String localFile) throws Exception {
if (url.getProtocol().equals("jar")) {
URLConnection connection = url.openConnection();
lastJarModifiedMs = connection.getLastModified();
if (debug) System.out.println("Resource "+localFile+" found in jar.");
}
} else {
System.out.println("Resource not found.");
if (debug) System.out.println("Resource "+localFile+" not found in jar.");
}
if (lastJarModifiedMs > currentTime) {
int lastSlashIndex = localFile.lastIndexOf('/');
Expand Down
Loading