DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  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

    >
    >



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links