How to run file*.py* in your Java program without using Jython? For example: I have JButton and I want to run python script when I click on the JButton. What should I put in Action Preformed for the button to run python script without using Jython?
相关问题
- Delete Messages from a Topic in Apache Kafka
- how to define constructor for Python's new Nam
- Jackson Deserialization not calling deserialize on
- streaming md5sum of contents of a large remote tar
- How to maintain order of key-value in DataFrame sa
You need to have the python interpreter installed in the machine where you want to do that and call this interpreter as an external command from Java.
Look at this question to know more about how perform that call: Execute external program in java
From there:
Additionally, you can use the returned Process object from
exec
to interact with your script input/output.