Updated to use the modified ECS classloader

This commit is contained in:
Manindra Moharana
2016-01-27 02:45:06 -08:00
parent f34b6e41cc
commit 578217c0ca
2 changed files with 9 additions and 5 deletions

View File

@@ -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();
}

View File

@@ -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;
}