This may not be the most optimal solution to your particular use case as you already have your application in Jython but JPype
(link) allows a CPython program to talk to a program running on JVM, I haven't tried it my self but found a hello world example here.
Basically you make your Java class, compile it into a jar and then in CPython do
import jpype
import os.path
jarpath = os.path.join(os.path.abspath('.'), 'build/jar')
jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.ext.dirs=%s" % jarpath)
# get the class
hello_world = jpype.JClass('com.stackoverflow.HelloWorld')
t = hello_world() # create an instance of the class
t.helloWorld("Say hello") # try to call one of the class methods
jpype.shutdownJVM()
I realise though that inverts your application logic. The other option would be to use subprocess
and serialise the inputs/outputs.
UPDATE
I came across a similar problem recently and decided to give JPype
a go and can now say that it's well worth using, although there are some issues installing it at least on OSX, see help here (some of the JVM paths need to be altered in setup.py
).