From 4af70cc8a48ef349a4d98695f1d5b6b54e21a319 Mon Sep 17 00:00:00 2001 From: Stef Tervelde Date: Tue, 25 Nov 2025 15:23:07 +0100 Subject: [PATCH] Also look into the modules folder for native jars --- app/src/processing/app/Library.java | 42 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/app/src/processing/app/Library.java b/app/src/processing/app/Library.java index f23354284b..0d9e5bdb27 100644 --- a/app/src/processing/app/Library.java +++ b/app/src/processing/app/Library.java @@ -1,14 +1,17 @@ package processing.app; -import java.io.*; -import java.util.*; -import java.util.zip.ZipFile; - -import processing.app.contrib.*; -import processing.core.*; +import processing.app.contrib.ContributionType; +import processing.app.contrib.LocalContribution; +import processing.core.PApplet; import processing.data.StringDict; import processing.data.StringList; +import java.io.File; +import java.io.FilenameFilter; +import java.io.IOException; +import java.util.*; +import java.util.zip.ZipFile; + public class Library extends LocalContribution { // static final String[] platformNames = PConstants.platformNames; @@ -398,27 +401,24 @@ public String getJarPath() { // so that it can be appended to other paths safely public String getClassPath() { StringBuilder cp = new StringBuilder(); - - String[] jarHeads = libraryFolder.list(jarFilter); - if (jarHeads != null) { - for (String jar : jarHeads) { - cp.append(File.pathSeparatorChar); - cp.append(new File(libraryFolder, jar).getAbsolutePath()); - } - } + addJars(libraryFolder, cp); File nativeLibraryFolder = new File(nativeLibraryPath); if (!libraryFolder.equals(nativeLibraryFolder)) { - jarHeads = new File(nativeLibraryPath).list(jarFilter); - if (jarHeads != null) { - for (String jar : jarHeads) { - cp.append(File.pathSeparatorChar); - cp.append(new File(nativeLibraryPath, jar).getAbsolutePath()); - } - } + addJars(nativeLibraryFolder, cp); + addJars(new File(nativeLibraryFolder, "modules"), cp); } return cp.toString(); } + private void addJars(File folder, StringBuilder cp) { + String[] jarHeads = folder.list(jarFilter); + if (jarHeads != null) { + for (String jar : jarHeads) { + cp.append(File.pathSeparatorChar); + cp.append(new File(folder, jar).getAbsolutePath()); + } + } + } public String getNativePath() { return nativeLibraryPath;