Defining a classpath for a Jython virtual environment
Question: I have installed [Jython](http://en.wikipedia.org/wiki/Jython), a
[virtualenv](http://pypi.python.org/pypi/virtualenv) named "jython-env" and
have installed "bottle" for doing some web application development. I have to
use some JAR files in this application for consumption by some Python code. I
know I have to set the classpath which should include these JAR files. I tried
setting the classpath using

    
    
    export classpath=/home/myname/jclasses/foo.jar
    

but when I try to import the class, it says _module not found_. I am very new
at Java and am doing this for the first time.

Can't the configuration be done such that I can just put the JAR files in the
sitepackages directory of my virtualenv and use it from there?


Answer: 
    jython -Dpython.path=/path/to/myjar.jar
    

Here's another idea: you could use a `.pth` file.

Create a file - `/path/to/jythonenv/Lib/site-packages/myjars.pth`:

    
    
    path/to/jar1.jar
    path/to/jar2.jar
    

Would also do the trick.

