我们可以通过 Runtime.getRuntime().exec();执行cmd命令的方式去执行python脚本,但是需要在Eclipse配置python的path,不然会报"系统找不到指定文件"。右键项目----run as–run
configurations----Enviroment—New…Name:PATH Value:python的安装路径。
结束!
Java在Eclipse执行python脚本
最新推荐文章于 2024-05-09 23:41:41 发布
我们可以通过 Runtime.getRuntime().exec();执行cmd命令的方式去执行python脚本,但是需要在Eclipse配置python的path,不然会报"系统找不到指定文件"。右键项目----run as–run
configurations----Enviroment—New…Name:PATH Value:python的安装路径。
结束!