Importing from an additional jar file in Jython node

2 posts / 0 new
Last post
baoilleach
Offline
Joined: 02/17/2012
Importing from an additional jar file in Jython node

Is it possible to import functions from a jar file when using the Jython nodes?

For example, in regular Jython I can add cdk-1.4.5.jar to the CLASSPATH and then "import org.openscience.cdk" will work.

If not currently possible, could I encourage this feature to be added as it would make it easy to use the CDK and Open Babel from Jython.

- Noel

gvanvuuren
Offline
Joined: 06/08/2010

This is an old post, but I'll reply for the record. What you're describing, works fine with the JPython nodes - you can add a jar with

 

sys.path.append(pathToJar)

 

and then you can do the import as usual.

 

Gideon