Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/edu/stanford/rsl/conrad/utils/CONRAD.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public abstract class CONRAD {
public static boolean useGarbageCollection;
public static final String EOL = System.getProperty("line.separator");
public static final long INPUT_QUEUE_DELAY = 0;
public static ClassLoader classLoaderForPyconrad = null; /// Regular ClassLoader doesnot work with pyconrad since Thread is detached from JVM
/**
* This flag can be used to control debug outputs.
* 0: No Debug output
Expand Down Expand Up @@ -272,6 +273,8 @@ private synchronized static ArrayList<Object> getInstancesFromConradFromClasspat
private static ArrayList<Class<? extends Object>> getClasses(String packageName)
throws ClassNotFoundException, IOException {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (classLoader == null )
classLoader = CONRAD.classLoaderForPyconrad;
assert classLoader != null;
String path = packageName.replace('.', '/');
Enumeration<URL> resources = classLoader.getResources(path);
Expand Down