Skip to content

Commit e21c69f

Browse files
committed
Updated to use the modified ECS classloader
1 parent a20de58 commit e21c69f

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

java/src/processing/mode/java/JavaMode.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,7 @@ public boolean handleExportApplication(Sketch sketch) throws SketchException, IO
283283
* @return searchPath: file-paths separated by File.pathSeparatorChar
284284
*/
285285
public String getSearchPath() {
286-
// Java Mode doesn't need any default external jars at the moment.
287-
// This is here for Android Mode so that it can add its android.jar file.
288-
return null;
286+
return getCoreLibrary().getJarPath();
289287
}
290288

291289

java/src/processing/mode/java/pdex/ErrorCheckerService.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public class ErrorCheckerService {
136136
* If true, compilation checker will be reloaded with updated classpath
137137
* items.
138138
*/
139-
protected boolean loadCompClass = true;
139+
protected boolean loadCompClass;
140140

141141
/**
142142
* List of jar files to be present in compilation checker's classpath
@@ -180,6 +180,7 @@ public ErrorCheckerService(JavaEditor debugEditor) {
180180
this.editor = debugEditor;
181181
xqpreproc = new XQPreprocessor(this);
182182
astGenerator = new ASTGenerator(this);
183+
loadCompClass = true;
183184
}
184185

185186

@@ -438,8 +439,13 @@ protected CodeCheckResult checkCode() {
438439
// If imports have changed, reload classes with new classpath.
439440
if (loadCompClass) {
440441
classPath = new URL[classpathJars.size()];
442+
/*System.out.println("CP Jars:");
443+
for (URL u: classpathJars) {
444+
String fn = u.getFile();
445+
System.out.println(fn.substring(fn.lastIndexOf('/')));
446+
}*/
441447
classPath = classpathJars.toArray(classPath);
442-
classLoader = new URLClassLoader(classPath);
448+
classLoader = new URLClassLoader(classPath, null);
443449
loadCompClass = false;
444450
}
445451

0 commit comments

Comments
 (0)