且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在嵌入式Tomcat上从Spring-Boot Web应用程序运行Python脚本

更新时间:2023-09-06 12:06:46

我在互联网上挖了很多东西,找到了解决方法.

I dug the internet a lot and found the solution.

可以使用以下命令执行此操作:

One can do this using the following commands:

String fetching = "python " + "c:\\Fetch.py \"" + songDetails + "\"";
String[] commandToExecute = new String[]{"cmd.exe", "/c", fetching};
Runtime.getRuntime().exec(commandToExecute);