From 008e44b28d5249cba287d8ac83236242110c6950 Mon Sep 17 00:00:00 2001 From: Ben Steffensmeier Date: Wed, 4 Dec 2024 18:30:41 -0600 Subject: [PATCH] Fix ClassList to handle jar in working dir with classpath in manifest. --- src/main/java/jep/ClassList.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/jep/ClassList.java b/src/main/java/jep/ClassList.java index 573364bd..57d29822 100644 --- a/src/main/java/jep/ClassList.java +++ b/src/main/java/jep/ClassList.java @@ -127,8 +127,11 @@ private void loadClassPath() { String[] relativePaths = classpath.split(" "); for (String relativePath : relativePaths) { - String path = file.getParent() + File.separator - + relativePath; + String path = relativePath; + String parent = file.getParent(); + if (parent != null) { + path = parent + File.separator + relativePath; + } if (!seen.contains(path)) { queue.add(path); seen.add(path);