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).

Psi
  • 83
  • 1
  • 7
Ebdulmomen1
  • 606
  • 1
  • 10
  • 21

1 Answers1

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.

Michael
  • 1,044
  • 5
  • 9
  • Machine learning. Pattern recognition. – Michael Jul 20 '19 at 19:44
  • 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. – Ebdulmomen1 Jul 20 '19 at 22:20