I need to use the library Jena which is in Java in my code that is written in Python. Now, I want to know if Jython can bridge between these two or not!!! according to this thread Jython can be invoked in a python code. but I need to access the functions in Jena and get back the answers into my python code. I am speculating that the code should look like below. the main part is the importing a java library, running the desired function and getting the results back.
import execnet
gw = execnet.makegateway("popen//python=jython", var1, var2)
channel = gw.remote_exec("""
import Jena #it is a java library.
reason(var1, var2)
...
""")
fun(channel)