diff --git a/java/src/processing/mode/java/JavaMode.java b/java/src/processing/mode/java/JavaMode.java index 8a09e1e73..ed9d4e3e3 100644 --- a/java/src/processing/mode/java/JavaMode.java +++ b/java/src/processing/mode/java/JavaMode.java @@ -283,9 +283,7 @@ public class JavaMode extends Mode { * @return searchPath: file-paths separated by File.pathSeparatorChar */ public String getSearchPath() { - // Java Mode doesn't need any default external jars at the moment. - // This is here for Android Mode so that it can add its android.jar file. - return null; + return getCoreLibrary().getJarPath(); } diff --git a/java/src/processing/mode/java/pdex/ErrorCheckerService.java b/java/src/processing/mode/java/pdex/ErrorCheckerService.java index 3850844ae..bc58d43e8 100644 --- a/java/src/processing/mode/java/pdex/ErrorCheckerService.java +++ b/java/src/processing/mode/java/pdex/ErrorCheckerService.java @@ -136,7 +136,7 @@ public class ErrorCheckerService { * If true, compilation checker will be reloaded with updated classpath * items. */ - protected boolean loadCompClass = true; + protected boolean loadCompClass; /** * List of jar files to be present in compilation checker's classpath @@ -180,6 +180,7 @@ public class ErrorCheckerService { this.editor = debugEditor; xqpreproc = new XQPreprocessor(this); astGenerator = new ASTGenerator(this); + loadCompClass = true; } @@ -438,8 +439,13 @@ public class ErrorCheckerService { // If imports have changed, reload classes with new classpath. if (loadCompClass) { classPath = new URL[classpathJars.size()]; + /*System.out.println("CP Jars:"); + for (URL u: classpathJars) { + String fn = u.getFile(); + System.out.println(fn.substring(fn.lastIndexOf('/'))); + }*/ classPath = classpathJars.toArray(classPath); - classLoader = new URLClassLoader(classPath); + classLoader = new URLClassLoader(classPath, null); loadCompClass = false; }