|
From: Robert W. B. <rb...@di...> - 2001-06-11 15:54:22
|
On Mon, 11 Jun 2001, Laurent TCHERNIACK wrote: > Hello, > > Just arriving into the Jython tools, after some experience with Python 2.0. > I started with success developing some examples in Jython using import > java.util etc.., and now I am trying to import my own java package > com.gemplus.softproduction. ... etc into the jython sources but I > received the following message: > "ImportError: No module named gemplus" > > So my question, how can I give to jython visibility to my > softproduction.jar package in order to be able to use the import > com.gemplus.softproduction of my java classes in the jython sources? Place softproduction.jar in the classpath before starting Jython: $bash} export CLASSPATH=$CLASSPATH:/path/to/softproduction.jar $bash} jython ... >>> from com.gemplus import softproduction >>> OR C:\> set CLASSPATH=%CLASSPATH%;c:\path\to\softproduction.jar c:\> jython ... >>> from com.gemplus import softproduction >>> You can also modify the jython startup script to include that jar in java.class.path (-cp). I know the examples aren't neccessary, but some disbelieve how easy it is. If things aren't as simple as above, check back. Robert |