I'm working on a big Java project right now, and I decided that the easiest way to "fix" an issue I have with the data in a File object would be to parse and edit it with a Python script I wrote. I tested the Python script on its own on this particular file (outside of Java) and it works fine. Now I'm just wondering how I integrate my Python script with the rest of my Java code.
I basically want to somehow pass this File object to my Python script, which has to be called from Java. Then I want to take the file that the Python script outputs, read it back in as a File object, and return that from this particular Java method.
From researching a bit, I've heard Jython come up a bit, as well as the built-in Python interpreter in Java 6 and later. I'm just not sure where to start. Or alternatively, I guess I could port this Python script over to Java, but that's kind of a last resort. Any help is appreciated!