Invoking UNIX shell commands from Java


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Invoking UNIX shell commands from Java

  1. #1
    Bikhod Guest

    Invoking UNIX shell commands from Java


    Hi

    I am new to Java so please bear with me.

    Is it possible to invoke UNIX utilities like grep etc from a Java program?
    If so, is there a sample/class that would show me the way?

    Thanks
    Bikhod

  2. #2
    Paul Clapham Guest

    Re: Invoking UNIX shell commands from Java

    Yes, Runtime.getRuntime().exec("your command goes here"). But read the API
    documentation for the Runtime class, it is often more complicated than just
    that.

    PC2

    "Bikhod" <bikhod@yahoo.co.uk> wrote in message
    news:3b94e248$1@news.devx.com...
    >
    > Hi
    >
    > I am new to Java so please bear with me.
    >
    > Is it possible to invoke UNIX utilities like grep etc from a Java program?
    > If so, is there a sample/class that would show me the way?
    >
    > Thanks
    > Bikhod




  3. #3
    Bikhod Guest

    Re: Invoking UNIX shell commands from Java


    Thanks Paul.

    "Paul Clapham" <pclapham@core-mark.com> wrote:
    >Yes, Runtime.getRuntime().exec("your command goes here"). But read the

    API
    >documentation for the Runtime class, it is often more complicated than just
    >that.
    >
    >PC2
    >
    >"Bikhod" <bikhod@yahoo.co.uk> wrote in message
    >news:3b94e248$1@news.devx.com...
    >>
    >> Hi
    >>
    >> I am new to Java so please bear with me.
    >>
    >> Is it possible to invoke UNIX utilities like grep etc from a Java program?
    >> If so, is there a sample/class that would show me the way?
    >>
    >> Thanks
    >> Bikhod

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center