How to use Jython libraries
Description
If you need to use some of the Jython/Python libraries normally found in the LIB directory of an install, then you have at least 2 choices both require a Jython install on the Confluence server. Jython needs to know the path to the library files.
Dynamic in codeÂ
import sys sys.path.append("/<path to Jython install>/LIB")
- Always available - environment variableÂ
Steps
- Install Jython on your confluence server
- Recommend setting environment variable
- Set JYTHONPATHÂ to the library directory of your install, example: /<path to Jython install>/LIB
- PYTHONPATHÂ also works
- Restart Confluence with the environment variable set
- Set JYTHONPATHÂ to the library directory of your install, example: /<path to Jython install>/LIB