7 messages in com.mysql.lists.javaHow to run a local program from a ser...
FromSent OnAttachments
Edilmar Alves14 Feb 2001 12:52 
Jody Brownell14 Feb 2001 13:42 
Sterling Moses14 Feb 2001 14:30 
Eric Muntz14 Feb 2001 15:14 
Tom Myers14 Feb 2001 18:03 
sch...@amgt.com14 Feb 2001 18:35 
Taglang, Guillaume14 Feb 2001 18:50 
Subject:How to run a local program from a servlet ?
From:Edilmar Alves (edil@intersite.com.br)
Date:02/14/2001 12:52:47 PM
List:com.mysql.lists.java

Hi,

I'm using JB3Ent + JDK1.3+MySQL3.23.

I'd like to start a Windows application from a Servlet, that would make some database access, other processing, and return a TXT file.

I'd like something like this:

String cmd = "c:/test.bat"; // tried also "c:\test.bat" and "c:\\test.bat" Runtime runtime = Runtime.getRuntime(); try { runtime.exec(cmd); } catch (Exception e) { e.printStackTrace(); }

but nothing occurs.

What's the problem ? Do Servlets have a Runtime ? The permissions to run test.bat are ok.