Skip to content

Commit 91c8a9f

Browse files
committed
Fix Libraries adding jars twice to class path
1 parent 50a9248 commit 91c8a9f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

app/src/processing/app/Library.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,13 @@ public String getClassPath() {
338338
cp.append(File.pathSeparatorChar);
339339
cp.append(new File(libraryFolder, jar).getAbsolutePath());
340340
}
341-
jarHeads = new File(nativeLibraryPath).list(jarFilter);
342-
for (String jar : jarHeads) {
343-
cp.append(File.pathSeparatorChar);
344-
cp.append(new File(nativeLibraryPath, jar).getAbsolutePath());
341+
File nativeLibraryFolder = new File(nativeLibraryPath);
342+
if (!libraryFolder.equals(nativeLibraryFolder)) {
343+
jarHeads = new File(nativeLibraryPath).list(jarFilter);
344+
for (String jar : jarHeads) {
345+
cp.append(File.pathSeparatorChar);
346+
cp.append(new File(nativeLibraryPath, jar).getAbsolutePath());
347+
}
345348
}
346349
//cp.setLength(cp.length() - 1); // remove the last separator
347350
return cp.toString();

0 commit comments

Comments
 (0)