Hi @toblatp,
You can definitely use Jython as a dependency for a node, in fact there are some (legacy) Jython scripting nodes somewhere in KNIME. The question is whether the library will work correctly in Jython, which it might not if it depends on native code.
An alternative is to use a Python scripting node and code your functionality as a python script (requires you to install the library in your python environment). This is more difficult to distribute though.
Can you tell me which python library you need ? Maybe I know a java alternative.
Thanks for your help, sorry I have been slow to reply to this one. Awesome, I will have a think about a solution to this, yes I think the tricky part is for distributing the python library. Its a library for writing to a niche data format, imzML, and I think it is only available in python.
If the library you are using is available via pip you can add a node that ensures it is installed to your workflow, e.g. via a Python Edit Variable node with the following code:
# create flow variable named random with 0 <= value <= 100
from pandas import DataFrame
import subprocess
import sys
def install(package):
subprocess.call([sys.executable, "-m", "pip", "install", "--user", package])
install("package1")
install("package2")
flow_variables['installed'] = "true"