有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java在windows上使用cmd运行文件

This is my directory. "C:\JAYAPRAKASH\softwares\ignite\gridgain-web-console-on-premise-2020.02.00". In this directory i have a file web-console (widows batch file). Now i need to run this file by Java, How can I do this?


共 (1) 个答案

  1. # 1 楼答案

    Process p = Runtime.getRuntime().exec(  The path to the file   );