From 4bda0d77d2708c6df68600a081c9bf764e8ce4c5 Mon Sep 17 00:00:00 2001 From: software2000 Date: Tue, 28 Nov 2023 12:45:56 +0100 Subject: [PATCH] use separatorChar instead of slash --- .../eclipse/persistence/tools/workbench/utility/Classpath.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utility/src/main/java/org/eclipse/persistence/tools/workbench/utility/Classpath.java b/utility/src/main/java/org/eclipse/persistence/tools/workbench/utility/Classpath.java index e2db3391..433ff2d3 100644 --- a/utility/src/main/java/org/eclipse/persistence/tools/workbench/utility/Classpath.java +++ b/utility/src/main/java/org/eclipse/persistence/tools/workbench/utility/Classpath.java @@ -345,7 +345,7 @@ public static String locationFor(Class javaClass) { return path.substring(0, path.length() - convertToClassFileName(javaClass).length() - 1); } else if ("jrt".equals(protocol)) { // jdk9 - jrt:/java.base/java/lang/Object.class - return path.substring(0, path.indexOf('/', 5)); + return path.substring(0, path.indexOf(File.separatorChar, 5)); } throw new IllegalStateException(url.toString());