[Jpype-users] dynamic CLASSPATH
Status: Beta
Brought to you by:
devilwolf
|
From: Steve S. <ssa...@in...> - 2008-04-26 18:49:02
|
In Java, I've used this recipe to dynamically load JARs: http://forum.java.sun.com/thread.jspa?threadID=300557 And in Jython, I've been able to duplicate that by using the following code and also appending the added JARs to sys.path: http://wiki.python.org/jython/JythonMonthly/Articles/January2007/3 But in JPype, I can't seem to find a similar way to do this. Even completely different would be okay since I have wrappers that allow for branches based on whether the code is running under Jython or JPype. Has anyone ever done this in JPype? The key is I'd like to add dynamically, after the JVM is started. I already know how to get the start-up CLASSPATH set, so I don't need pointers on that. Trying to translate the Java/Jython code, the first place I fail is trying to call java.net.URLClassLoader.getDeclaredMethod(): AttributeError: type object 'java.net.URLClassLoader' has no attribute 'getDeclaredMethod' Any insight appreciated. -- Steve Sapovits Invite Media - http://www.invitemedia.com ssa...@in... |