英文:
Returning arguments from Java and Python
问题
想象一下,我有一个名为real.java的脚本,它需要将参数A、B和C传递给一个名为code.py的Python脚本。然后,code.py执行一些操作,并且需要将参数fi和foo返回给real.java。但我不知道如何在Java和Python中创建这个函数。
英文:
Imagine I have script real.java which has to pass arguments A, B and C to a python script code.py. Then, code.py does something and have to return arguments fi and foo to real.java. But I do not know how to do create that function in java neither in Python
答案1
得分: 1
你可以使用ProcessBuilder,或者你可以使用类似jython的东西。
<br>ProcessBuilder示例:https://stackoverflow.com/questions/55388121/how-to-return-value-from-python-script-to-java-using-processbuilder
Jython文档:https://www.jython.org/
英文:
You can use ProcessBuilder or you can use something like jython.
<br>ProcessBuilder example: https://stackoverflow.com/questions/55388121/how-to-return-value-from-python-script-to-java-using-processbuilder
Jython Documentation: https://www.jython.org/
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论