Access a python file in a jython jar from Eclipse?

2019-09-11 03:23发布

问题:

I'm currently working on a project involve Java and Python. Long story short, I followed some post on ways to access Python file from Java by packaging the file into a jython jar and import into the Java project.

Instead of using "java -jar jython.jar run.py" to call the run.py, anybody know if there is way to call the file from Eclipse (assuming I already add the jython.jar into to my build path?

Thank you so much!

回答1:

Drag this image in the entry bar in your browser. The PythonInterpreter executes test.py.