From: Carlos Q. <car...@we...> - 2001-09-26 20:16:16
|
On Wednesday 26 September 2001 22:09, Ted Berg wrote: Hi Ted, could you describe how you load dynamically a java jar, I have had some problems to do it Regards > I have a java application that makes use of jython as a scripting engine. > I want to allow the end user to extend the functionality I provide by > dynamically loading module ( java or python ) at runtime. The java stuff > is working fine, but i'm running into a problem with the embedded python. > > runtime sys.path looks like this: > ['.', > '/home/tedberg/.javaws/cache/http/Djopenrpg.sourceforge.net/P80/DMfiles/RMj >openrpg.jar!Lib', > '/home/tedberg/.javaws/cache/http/Djopenrpg.sourceforge.net/P80/DMfiles/RMj >openrpg.jar!scripts', '/home/tedberg/jopenrpg'] > > I can import python modules in the directories "Lib" and "scripts" that are > in the jar. What I *cannot* do, and *need* to do, is import modules in > "!scripts/pyhandlers". > > I have tried: > from scripts import pyhandlers > import scripts.pyhandlers > import pyhandlers > > all of which return a "no module named" referencing scripts and pyhandlers > respectively. > > Also: > I can do a "import nodehandlers" ( nodehandlers is a dir in > /home/tedberg/jopenrpg ), but I cannot import any modules *within* that > directory.l > > What *am* I doing wrong? > > ted > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |