0

I'm trying to build an OCR desktop application using Java and, to do this, I have to use libraries and functions that were created using the Python programming language, so I want to figure out: how can I use those libraries inside my Java application?

I have already seen Jython, but it is only useful for cases when you want to run Java code in Python; what I want is the other way around (using Python code in Java applications).

2
  • Jython seems to be a dead project. Last release was in 2017 and it is only compatible with Python 2.7. Commented Jul 20, 2019 at 19:31
  • Jython is for running Python code in Java. Commented Jul 20, 2019 at 19:31

1 Answer 1

1

I have worked in projects where Python was used for ML (machine learning) tasks and everything else was written in Java.

We separated the execution environments entirely. Instead of mixing Python and Java in some esoteric way, you create independent services (one for Python, one for Java), and then handle inter-process communication via HTTP or messaging or some other mechanism. "Mircoservices" if you will.

Sign up to request clarification or add additional context in comments.

2 Comments

Machine learning. Pattern recognition.
actually that might be better, if you could just provide some clarification about what do you mean by Independent Services?, i might really put this under consideration because the other methods are really confusing.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.