File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes getRuntime().exec() from servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getRuntime().exec() from servlet" Watch "getRuntime().exec() from servlet" New topic

getRuntime().exec() from servlet

Yogesh Gaikwad

Joined: Feb 26, 2005
Posts: 15
how to use Runtime.getRuntime().exec("bat file name"); from servlet deployed on tomcat 5.0?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

It looks like you've got it.
What's got you stumped?

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
osman cinar eren
Ranch Hand

Joined: Jan 25, 2005
Posts: 78

you may try

.exec("cmd.exe bat_file_name");

Jeffrey Spaulding
Ranch Hand

Joined: Jan 15, 2004
Posts: 149

I agree. Here's the link:
subject: getRuntime().exec() from servlet
It's not a secret anymore!