Skip to content

Commit

Permalink
Fix compilation in module enabled applications
Browse files Browse the repository at this point in the history
  • Loading branch information
rickardoberg committed Dec 19, 2024
1 parent 190ced3 commit d1e4470
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jte/src/main/java/gg/jte/compiler/ClassUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ public static void resolveClasspathFromClassLoader(ClassLoader classLoader, Cons
pathConsumer.accept(path);
}
}
String modulePath = System.getProperty("jdk.module.path");

if (!StringUtils.isBlank(modulePath)) {
String[] paths = modulePath.split(separator);
for (String path : paths) {
pathConsumer.accept(path);
}
}

if (classLoader instanceof URLClassLoader loader) {
for (URL url : loader.getURLs()) {
Expand Down

0 comments on commit d1e4470

Please sign in to comment.