On Sep 23, 9:20 am, Arne Vajh?j<a...@vajhoej.dk> wrote:
On 9/22/2011 11:09 AM, SamuelXiao wrote:
I have a Java program that needs to run a command in AIX environment.
The code is as follows:
String[] cmds ={"/bin/ksh","-c","uuencode /log/test.log attached.log |
mailx -s 'Testing' a...@example.com "};
Process process = Runtime.getRuntime().exec(cmds);
But I found that it does not work, the cmd is fine because I have
tried it in AIX without using these code. It seems that AIX does not
allow the process to be created?
Does anyone know if there is any configuration to allow it in AIX? I
have also post this question in the AIX forum.
Impossible to say what the problem is based on this info.
Try read output and error from the process and see if
you get some relevant info back.
Hi Arne,
Actually, I used this:
String[] cmds ={"/bin/ksh","-c","uuencode /log/test.log attached.log |
mailx -s 'Testing' a...@example.com "};
System.out.println("Before process run");
Process process = Runtime.getRuntime().exec(cmds);
System.out.println("After process run");
both message displayed, but the process really not running.
process.
Try do that.