java - 使用Java命令执行Makefile?

标签 java makefile

我只是闲逛而已。是否可以使用 Java 命令执行 makefile.in ?就像使用 Java 和 Ant 可以做的事情一样。

谢谢

最佳答案

如果我正确理解问题和评论,那么您想使用类似 Runtime.exec(String) 的内容.

String command = "make stuff" ; the make command you wish to run
String [] envp = { } ; if you want to set some environment variables
File dir = new File ( "/home/me/" ) ; // this is the directory where the Makefile is
Process proc = Runtime.getRuntime().exec(command,envp,dir);
proc.waitFor ( ) ;

关于java - 使用Java命令执行Makefile?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7101468/

相关文章:

java - 如何修复 "JRException: Error compiling report java source files"错误?

java - 如何在保持当前连接的情况下连接到多个服务器?

java - 动态添加数组到数组中

java - PyLucene 的 Make 和 Make install 出现问题

c++ - 如何针对自定义 CUDA 安装使用 OpenCL 构建 GDAL?

makefile - 对带有空格的文件名使用makefile通配符命令

java - Apache POI + JAVA + Excel 在单元格中添加值不起作用

java - 空 View 不显示在 ListView 中

linux - make 命令如何调用其他子 shell 来执行配方

list - Makefile - 遍历列表并选择特定值