Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!news.tele.dk!feed118.news.tele.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Thu, 22 Sep 2011 21:20:17 -0400 From: =?ISO-8859-1?Q?Arne_Vajh=F8j?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Java Runtime getRuntime().exec not work in AIX References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 23 Message-ID: <4e7bded3$0$286$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 72.192.23.141 X-Trace: news.sunsite.dk DXC=e@@lmI1T4Nf;WQX[a]Da8CZP]o3iAoHHkMXT91j X-Complaints-To: staff@sunsite.dk Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8228 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' abc@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. Arne