Running Python command line utility from Java

I developed a command line utility that needs to be called from a Java GUI application. The Java GUI team would like to bind my command-line application to a button in the GUI; the Python application is such that at that time we have no time or interest in rewriting it in Java.

I have no experience in Java, so I ask you:

What is the best way to bind a command line based Python application to a button in a Java GUI application?

I am very worried about exception management (how to tell Java that Python failed).

Thank.

+3
source share
3 answers

Java Runtime.exec(). .

, stdout stderr ( - . ), . , , . ( ), .

+1

jython? : 1) python ( Java) 2) python , Java jython , .

0

phlip - Java Python. Python - DLL, . : http://jythonpodcast.hostjava.net/jythonbook/chapter10.html , .

0

Source: https://habr.com/ru/post/1767213/


All Articles