Runtime.getRuntime().exec() , 调用python脚本,怎么传入相对路径参数
如下代码:
Process proc = Runtime.getRuntime().exec("python src/main/resources/datax/bin/datax.py /src/main/resources/datax/job/mysqltomysql.json");
报错提示:
Caused by: java.io.FileNotFoundException: File 'E:\src\main\resources\datax\job\mysqltomysql.json' does not exist,路径中并没有指定E盘,为什么会提示E:\src\main\resources\datax\job\mysqltomysql.json'