users@glassfish.java.net

Runtime.exec from glassfish as a windows service

From: <glassfish_at_javadesktop.org>
Date: Thu, 12 Aug 2010 07:57:56 PDT

Hi,

I have a problem on Glassfish 3.0.1 running on windows server 2008. I'am using a servlet to start another process but this has stopped working. I recently changed Glassfish to run as a service so that it would not terminate if a user logs out. Up until the service change all was working fine.

Test code snippet :-

String cmd = "notepad";
System.out.println(cmd);
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec( cmd );

There are no error messages or exceptions in the server log.
The code still works fine on my development XP machine where Glassfish is not a service.

Is Glassfish running as a service the problem?
How can I resolve this issue?

Thanks in advance

Alan
[Message sent by forum member 'alan_314']

http://forums.java.net/jive/thread.jspa?messageID=480017