Massimo Conti wrote:
>
> Hi |
> here is how I made this :
>
> import java.lang.Runtime;
>
> public void startService(String programName) {
>
> try {
> path = "/your/path/";
> (Runtime.getRuntime()).exec(path+programName);
> }
> catch (Exception e) {
> System.out.println(e);
> }
> }
>
It's not so easy.....!!
For exemple, if you want to run "ls", you must handle the output with
stream and do a loop to show the result.
For my job I need to interface some comands like this:
psxy -R...parameters...> prova.ps
psxy is a GMT (Generic Mapping Tolls)command which creates a ps file.
It doesn't work!!!
I don't know what is handled from Linux and what must be implemented
with java.
Is there anybody who knows more about it?