DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Shyam Sunder Guest

    Shell Command in Java


    Hi,
    1) I want to execute a shell command in Java..How can i do it?
    2)I want to change the Printer from the Default one to the one which i want
    in Java..How can i do it??


    Shyam..



  2. #2
    Ruchi Dhar Guest

    Re: Shell Command in Java


    "Shyam Sunder" <shyamsunder30@yahoo.com> wrote:
    >
    >Hi,
    >1) I want to execute a shell command in Java..How can i do it?


    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("whole path to the batch file");
    proc.wait();


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