title: Running Python in Java (or vice versa)
body: <p>I'm currently making a java GUI (JPanel) that is supposed to display output from a python model. So far I'm trying to have the java code run python, which I have no idea how to do. The main goal is to have both java and python running simultaneously so that any results from the python model can be displayed on the java GUI in real time.</p>
  <p>Doing the reverse (running the java GUI in python) could work as well, but the GUI has a lot of settings/packages/JVM arguments that I am not experienced enough to deal with, so I really don't want to go down that route unless I have to.</p>
  <p>So far, I have tried ProcessBuilder with BufferReader in java, but that only displays results after the python model finishes running, not in real time. I thought about using Jython, but I heard that it doesn't work for python 3.x versions.</p>
  <p>How can I run python in java? If I can't/shouldn't what should I do then?</p>