Shell Command in Java


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Shell Command in Java

  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();


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