I want to run a python script called, for example foo. And I have the absoulute path, lets say: /Users/me/pythonscripts/
I have tried running:
St
this work for me
public static void main(String[] args) throws IOException{ Runtime runtime = Runtime.getRuntime(); Process p1 = runtime.exec("D:\\programs\\Anaconda3\\Scripts\\spyder.exe \"C:\\Users\\Al-Hanouf\\codes\\PageRank.py\""); System.out.print("is process alive = "+p1.isAlive()); }