The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


How i can aoutomaticly run exe file using java

Posted by M. ALBES on August 09, 2001 at 5:55 AM

> i have a exe file on my server and some supporting files r also there,first tell me how can i pass the path of a server n other thing how can i call all supporting files

> <%@ page language="java" %>

> <%
> Runtime r=Runtime.getRuntime();
> Process p=null;
> try{
> p=r.exec("http://SWIN-5/c:/BulkMailer.exe");
> p.waitFor();
> }catch(Exception e){

> System.out.println("Exception"+e);
> }
> int i=p.exitValue();
> response.sendRedirect("Start.html");

> %>


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us