For Programmers: Free Programming Magazines  


Home > Archive > Java Help > February 2005 > HOW TO HANDLE CONTROL_LOGOFF_EVENT handler in JAVA









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author HOW TO HANDLE CONTROL_LOGOFF_EVENT handler in JAVA
Zafar

2005-02-23, 4:00 am

Hi All,

One of my services is killed when i log off from my Win XP/2000
machine, i.e., it is removed from the list of running processes in the
Task Manager . It needs to be restarted manually again after a login.

I did some investigation and found that this was due to the
"CTRL_LOGOFF_EVENT" passed by the
JVM(http://java.sun.com/j2se/1.3/docs/t...win32/java.html). It
further said to use the -Xrs option to ignore such events.

Can someone please tell me how to use this option correctly? Its really
urgent, and I am currently at my wits end,so any help would be greatly
appreciated.

Thanks In advance,
Zafar

Steve W. Jackson

2005-02-28, 9:00 pm

In article <1109143474.828567.28770@g14g2000cwa.googlegroups.com>,
"Zafar" <zafarsm@gmail.com> wrote:

> Hi All,
>
> One of my services is killed when i log off from my Win XP/2000
> machine, i.e., it is removed from the list of running processes in the
> Task Manager . It needs to be restarted manually again after a login.
>
> I did some investigation and found that this was due to the
> "CTRL_LOGOFF_EVENT" passed by the
> JVM(http://java.sun.com/j2se/1.3/docs/t...win32/java.html). It
> further said to use the -Xrs option to ignore such events.
>
> Can someone please tell me how to use this option correctly? Its really
> urgent, and I am currently at my wits end,so any help would be greatly
> appreciated.
>
> Thanks In advance,
> Zafar


I recall dealing with this issue several months ago and never quite
finding a suitable solution. I ultimately ended up using the freely
available program JavaService, which I obtained from the web site at
<http://www.multiplan.co.uk/software...vice/index.html>. Since
that time, I see that there have been updates to it and somebody else
has taken it on as an open source project. Links are there to all of
that.

This turned out to be the easiest overall solution for my purposes, so
that I could create batch files that install or uninstall a service that
will work quite nicely.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com