Is there any way to run a function from python and a function from java in one app in parallel and get the result of each function to do another process?
There are at least three ways to achieve that.
a) You could use java.lang.Runtime
(as in Runtime.getRuntime().exec(...)
) to launch an external process (from Java side), the external process being your Python script.
b) You could do the same as a), just using Python as launcher.
c) You could use some Python-Java binding, and from Java side use a separate Thread
to run your Python code.