Currently I am working on a Java web app implementing the Spring Framework + MVC structure. I have ~10 different Python scripts that all query an API, perform some data analysis and manipulation, and save the results. All of the python scripts are in the same directory.
I would like to know how/ what would be the most efficient way to run these files from my service's Controller. Browsing around, I've seen solutions similar to this:
String command = "python /c start python path\to\script\script.py";
Process p = Runtime.getRuntime().exec(command);
However, since they are all in the same directory, I was wondering if there is a more efficient way to run the files. Perhaps another 'driver' script that calls each of the ~10 files, and then running that 'driver' from my Java file?
Any advice or suggestions would be appreciated. Let me know if any additional information is required.