[Ilugc] Executing Linux Commands with Java GUI

Ramesh Jothimani linuxrockers at gmail.com
Tue Feb 16 16:35:57 IST 2010


>I just need to make up a simple GUI in java to create user account in remote system. how >can I do it?

On 2/16/10, Arun Venkataswamy <arun289 at gmail.com> wrote:
> On Tue, Feb 16, 2010 at 8:34 AM, Ramesh Jothimani
> <linuxrockers at gmail.com>wrote:
>
>> How to execute Linux commands in terminal with the help of Java GUI and
>> how
>> to store the result back to a file?
>>
>
>
> This sample code might be a starting point...
>
> Process p = Runtime.getRuntime().exec("whatever command");
>
> BufferedReader stdInput = new BufferedReader(new
>             InputStreamReader(p.getInputStream()));
>
> // read the output
> String s;
> while ((s = stdInput.readLine()) != null) {
>    System.out.println(s);
> }
>
>
> Regards,
> Arun
>
>
>
> --
> Arun Venkataswamy
> http://arun289.wordpress.com
> _______________________________________________
> ILUGC Mailing List:
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
>


More information about the ilugc mailing list