how to execute a shell command from java on a mac machine.. thanks in advance
A ashokformac macrumors member Original poster Mar 26, 2007 34 0 Apr 3, 2007 #1 how to execute a shell command from java on a mac machine.. thanks in advance
robbieduncan Moderator emeritus Jul 24, 2002 25,611 893 Harrogate Apr 3, 2007 #2 The same way as any other machine. Via Runtime exec methods. The return a Process object which gives you access to stdin, stdout and stderr of the process. Wrap these in BufferedReader/Writer objects and you are good to go.
The same way as any other machine. Via Runtime exec methods. The return a Process object which gives you access to stdin, stdout and stderr of the process. Wrap these in BufferedReader/Writer objects and you are good to go.