Home > Back-end >  The Runtime. GetRuntime (). The exec ()
The Runtime. GetRuntime (). The exec ()

Time:09-25

//I want to use Java calls is a python script, the first thought is the Runtime getRuntime (). The exec () the function, but my python environment is with the configuration of the anaconda, the first to enter the base environment, it is a problem,
 String [] the arguments=new String [] {" conda activate base ", "python", "E: \ \ programming \ \ Java \ \ chuangxing \ \ myself \ \ SRC \ \ the add py", "lei", "23"}; 

But such complains
 under Caused by: Java. IO. IOException: CreateProcess error=2, the system cannot find the specified file, 

I want to ask how to modify the can enter the base environment to run the script
  • Related