How to execute shell command form Java servlet?

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2006
Posts: 34
Reputation: Joncamp is an unknown quantity at this point 
Solved Threads: 0
Joncamp Joncamp is offline Offline
Light Poster

How to execute shell command form Java servlet?

 
0
  #1
Nov 6th, 2006
In many languages (like PHP/Perl) you can execute shell commands, what package or method do you use in Java2 to execute a shell command?

Thanks,
Jon
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,461
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 263
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: How to execute shell command form Java servlet?

 
0
  #2
Nov 6th, 2006
Runtime.exec( ) ;

Search on JavaWorld.com for a good article about the traps and pitfalls of Runtime.exec
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC