How to Use External Jython Classes in Flux?
Introduction
The version of Jython has been updated from 2.7.0 to 2.7.1.
The new version 2.7.1 offers new interesting modules as numpy and scipy, but only a few tests have been done. However we guarantee the no-regression.
User*.jar library can be placed in a specific folder, and automatically read by Flux.
<INSTALLFLUX>\Third_party\jython-2.7.1\javalib
Goal
Sometimes a user would like to extend the capabilities of the python scripts run by Flux for example to access a database.
This often requires to add third party jars to the classpath of Flux so that those third party classes become available in the Flux Jython session.
Prerequisite
The method described below requires that at least version 2018.1 of Flux is installed.
Step-by-step
- Download the jar(s) that contains the classes you want to use in Flux Jython
- Copy the jar(s) in %INSTALLFLUX%\Third_party\jython-2.7.1\javalib
- Start (or restart) Flux