Created
February 3, 2011 20:57
-
-
Save kastork/810179 to your computer and use it in GitHub Desktop.
Here's a quick little method to take control of the classpath right inside a Jython script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
... | |
def setClassPath(): | |
libDir = "/path/to/my/jar/files/" | |
classPaths = [ | |
"foo.jar", | |
"bar.jar" | |
] | |
for classPath in classPaths: | |
sys.path.append(libDir + classPath) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment