如何以编程方式将批处理转换为 exe

How to convert batch to exe programmatically

我想知道如何在 Java 中以编程方式将 .bat 文件转换为 .exe 文件,我正在尝试制作批处理 IDE。

谢谢!

这是我在网上找到的一段代码:

public static void main(String[] args) {
    try {
        Runtime.getRuntime().exec("c:\executable.exe");
        Runtime.getRuntime().exec("cmd /c c:\batch_file.bat");
    } catch (IOException e) {
    }
}

可以找到关于此主题的更多信息 here