I am attempting to create a Java source file which will interface with my Grails application. When a certain action is performed, I want this Java file to execute a program via commandline. I am attempting to do this via the Runtime.getRuntime().exec() command, however I keep getting an error about the Runtime object being undefined. Is it not possible to get a handle on this object through Grails?
+1
A:
If you are using Java 5 or later you are better off using ProcessBuilder
rather than Runtime.exec
. See here for more information.
Vinay Sajip
2009-07-15 14:29:34
Looks like this should fix it, thanks!
Neitherman
2009-07-20 14:36:25