T
T
Therapyx2018-03-05 13:38:39
Python
Therapyx, 2018-03-05 13:38:39

How to make a bridge between Python and Java programs?

Does anyone have an example of how you can call functions with return parameters of a python program directly from Java? Or, as a last resort, on the contrary - from the python to send values ​​​​to the Java functions?
It is necessary to use libraries like sklearn and keras so that the results of the algorithms are ultimately in Java.
So far, I have only found Jython, but I'm not sure if it will suit this task exactly, maybe there are better solutions. In general, it is interested in something that definitely "works"))

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DVamp1r3, 2018-03-05
@DVamp1r3

use RPC
use jython (but won't use python3)
run python as a process and read output
run python as a process and store in storage available to all components

K
kagary 06, 2018-03-05
@kagary06

Why not use the option of storing the results of Python work in some kind of storage in RAM?
For example Redis or Mongo (in In-Memory Storage Engine mode).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question