This content has been marked as final. Show 4 replies
What's the best way to start a Java app on Windowsa better way than being run as a service? like what? what's wrong with wrapping it as a service? that's exactly what you want. it's a platform-neutral language, remember. for it to explicitly include windows service code would be anathema to that
when it has to run as a server? (Most responses seem
to present the C wrapper & Service solution but
surely as a mature language, Java must have a better
way of doing this???)
I have a similar dilemma:
Product called "Exstream Dialogue" runs a real-time engine. The engine is an executable, apparently written in C++. The engine has a client connection to a JMS queue. (Sonic)
The engine is started via batch script. I have tried running the script as a scheduled task or as a system service. Either way, when someone logs on and off the server using: Dameware, VM Console, or the console, the engine gets killed. Remote Desktop Connection (log on and log off) does not cause the engine to get killed.
I believe what is getting killed is the JMS connection, which drops the engine.
Since RDC doesn't use the console (Dameware, VM C, and obviously the real console - use the console) it doesn't kill "ancillary" tasks.
Tried writing a java "wrapper," which is started as a service, which then starts the engine. The wrapper doesn't get killed, but the engine still does - no surprise. Code was put in the wrapper to restart the engine if it "disappears." Hokey way to solve this problem.
The question remains: how to prevent a running task (that has java ties) from being whacked by a console logoff?
Vendors are useless - all point to the other components. (And all of them tell me to stop using VM Console and Dameware. Gee, thanks. Why don't you stop Niagra Falls while I fix an erosion problem...)