From 92e488bc1eae845c672d4eedda5edf958cb7fb51 Mon Sep 17 00:00:00 2001 From: John Eberhard Date: Thu, 23 Jul 2026 06:58:41 -0500 Subject: [PATCH] Update load from jar file Signed-off-by: John Eberhard --- src/test/JDJSTPTestcase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/JDJSTPTestcase.java b/src/test/JDJSTPTestcase.java index 5f8a7e7..50bac2b 100644 --- a/src/test/JDJSTPTestcase.java +++ b/src/test/JDJSTPTestcase.java @@ -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; @@ -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('/');