Skip to content

Commit ddeff12

Browse files
committed
figuring out ClassLoader issues with new ext.dirs setup
1 parent be48c2d commit ddeff12

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

app/src/processing/app/contrib/ModeContribution.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ public ModeContribution(Base base, File folder,
104104
public void clearClassLoader(Base base) {
105105
List<ModeContribution> contribModes = base.getModeContribs();
106106
int botherToRemove = contribModes.indexOf(this);
107-
if (botherToRemove != -1) { // The poor thing isn't even loaded, and we're trying to remove it...
107+
// The poor thing isn't even loaded, and we're trying to remove it...
108+
if (botherToRemove != -1) {
108109
contribModes.remove(botherToRemove);
109110

110111
try {
112+
// This cast should be safe, since the only case when loader is not a
113+
// URLClassLoader is when no archives were found in the first place.
111114
((URLClassLoader) loader).close();
112-
// The typecast should be safe, since the only case when loader is not of
113-
// type URLClassLoader is when no archives were found in the first
114-
// place...
115115
} catch (IOException e) {
116116
e.printStackTrace();
117117
}
@@ -161,8 +161,8 @@ public String initLoader(Base base, String className) throws Exception {
161161

162162
ArrayList<URL> extraUrls = new ArrayList<>();
163163
if (imports != null && imports.size() > 0) {
164-
// if the mode has any dependencies (defined as imports in mode.properties),
165-
// add the dependencies to the classloader
164+
// if the mode has any dependencies (defined as imports in
165+
// mode.properties), add the dependencies to the classloader
166166

167167
HashMap<String, Mode> installedModes = new HashMap<>();
168168
for(Mode m: base.getModeList()){

build/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@
560560
<option value="-Djna.nosys=true" />
561561

562562
<!-- deal with jokers who install JOGL, ANTLR, etc system-wide -->
563-
<option value="-Djava.ext.dirs=lib/ext" />
563+
<option value="-Djava.ext.dirs=$APP_ROOT/Contents/PlugIns/jdk${jdk.esoteric}.jdk/Contents/Home/jre/lib/ext" />
564564

565565
<option value="-Dapple.laf.useScreenMenuBar=true" />
566566
<option value="-Dcom.apple.macos.use-file-dialog-packages=true" />

0 commit comments

Comments
 (0)