users@glassfish.java.net

Re: Runtime.exec from glassfish as a windows service

From: <glassfish_at_javadesktop.org>
Date: Fri, 13 Aug 2010 05:17:19 PDT

Noah,

Yes the code execution would just hang.It stopped working the first time I changed Glassfish to a service. I added the code from your link but at first I got the same result.

Ludo,

Notepad was a bad example program to test with, when I changed the cmd to :-
command[] = {"cmd.exe","/c","dir"};

I started to see the results with the addition of Noah's suggested code. Changing back to my real process I can now see the program start and where it hangs. It's a java program that uses some a native dll.

Looks like more debugging to do but at least I have a means to see what's happening.

Have a good weekend.

Alan
[Message sent by forum member 'alan_314']

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