Java start python process
I "solved" it.
I compiled it with pyinstaller and now it works. Python seems to be the problem here.
But I don't know why....
For others I compiled it to an executable with pyinstaller --onefile sensor.py
I'm trying to start a python script via java and send the data via socket back to the java program.
My problem is that when I start the python script after the SocketServer is created with Runtime.getRuntime().exec("python3 ~/Documents/sensor/sensorADC.py");
no connection is established and no data is transmitted.
But when I start the script manually via CLI, everything works fine.
The timing of the program start shouldn't be the problem, because I already tried different ways and orders.
The java program is a javaFx application.
EDIT: tested in Linux
2nd Edit:
    private void startPythonScript () {
        try {
            measureProcess = Runtime.getRuntime().exec("python3 ~/Documents/sensor/sensorADC.py")); 
        } catch (IOException e) {
                e.printStackTrace();
        }
    }
What am I missing?
Thank you in advance