I am trying to invoke a Python script from a Spring Boot application which is bundled as a JAR. I added Maven dependency for Jython Standalone JAR. The following code throws error at the execfile call (the code is able to get the Python file as input stream correctly):
My Python script is using the following imports:
I assume that it is probably happening because I am unable to set the property "python.path", but I am not sure how could I do that (the Jython JAR is being bundled under BOOT-INF/lib by Spring Boot). Also, there is no way for me to actually provide an absolute path for the Python installation (if that is what Jython expects) as the JAR would be deployed on a PaaS where file-system access is not enabled.