title: How to call an internal Python service for a Java-based Spring Boot project
body: <p>I have the following problem and I am asking for the better approach.</p>
  <p>I have to execute a Python script from the inside of a Spring Boot project. The script should be pretty easy but was made by other people and if possible I want to avoid the needing of change it.</p>
  <p>From what I have understand I have two options:</p>
  <ol>
  <li>From my Java code I execute a shell command, something like shown here:
  <a href="https://www.baeldung.com/run-shell-command-in-java" rel="nofollow noreferrer">https://www.baeldung.com/run-shell-command-in-java</a></li>
  </ol>
  <p>Using this approach probably I have to handle the operating system recognition of where my script run and deal with it.</p>
  <ol start="2">
  <li>Using <strong>Jython</strong> to embedd Python code into my Java code but I really don't know how it works and if probably I will face compatibility code (the code was made from other people, it should be very easy but it is better if I have not to change something on this code).</li>
  </ol>
  <p>So what way you suggest me?</p>