Bundling python files inside jar for access via jython
问题 In the following code I simply execute test.py from java code using jython public static void main(String[] args) { org.python.util.PythonInterpreter python = new org.python.util.PythonInterpreter(); python.execfile("test.py"); ... My problem is test.py needs to be in same directory from where jar file is run. I need this test.py bundled inside the jar and still be able to execute it using jython. Approach suggested in How do you invoke a python script inside a jar file using python? to read