On Thu, 22 Jul 1999, Yuet Sim Lee wrote:
> I am trying to make my Java code
> to exec another Unix program.
> The command in Unix/Linux platform
> is:
>
> "ppmtogif inputfile.ppm > outputfile.gif"
>
> The command will create a new output file
> storing a gif formatted image.
> However, I tryed the following in my
> Java code:
You need to exec a shell and have it run your
program. Try something like
String cmd = "/bin/sh -c \"ppmtogif inputfile > outputfile\"";
...
I hope that helps
Mo DeJong
dejong at cs.umn.edu
> String command = "ppmtogif inputfile > outputfile";
> try {
> Process GUIP = Runtime.getRuntime().exec(command);
> } // End for try
>
>
> It does not do work.
>
>
> --Sim
>
>
>
> --
> Yuet Sim Lee
>
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]