我只是闲逛而已。是否可以使用 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/