Running Python command-line utility from Java -


i developed command-line utility needs called java gui application. team in charge on java gui bind command-line application button in gui; python application such @ time have no time or interest in rewriting in java.

i have no experience whatsoever in java, ask you:

what best way bind command-line based python application button in java-based gui application?

i concerned exception management (how tell java python failed).

thanks.

you should able execute spawned process java using runtime.exec(). here's examples.

make sure capture stdout , stderr (concurrently - see this answer more details) can report on errors. can capture exit code of application, make sure application correctly reports errors. error code more reliable way of detecting errors (i suspect) thatn parsing output streams.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -