Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java VM exits but winrun4j does not terminate #79

Open
kc7bfi opened this issue Apr 19, 2017 · 3 comments
Open

Java VM exits but winrun4j does not terminate #79

kc7bfi opened this issue Apr 19, 2017 · 3 comments

Comments

@kc7bfi
Copy link

kc7bfi commented Apr 19, 2017

I have a java desktop application that is launched using winrun4j. The java application exists and I see the message "Application exited" but I still see the executable in Task Manager. When I try to connect with jconsole or jvisualvm, it won't connect. I assume because Java has terminated. Any thoughts on what may be going on? David

@bdw429s
Copy link

bdw429s commented Jan 29, 2019

@kc7bfi Did you ever get an answer on this? I noticed the same behavior that when my ServiceMain method returns, the service just keeps trucking even though nothing is running. Even if I throw an exception or return a non-zero value, the service stays running. The only way I found to work around it, was to set a boolean flag when the shutdown service signal was sent in my ServiceRequest method and then when my ServiceMain method got to the end, if the shutdown flag was still false, then I assume that something bad happened that killed my app other than a service stop signal, and I run

System.exit( 1 );

which seems to be the only way I can get the stupid service to actually stop. Sadly, it doesn't register as a failure so the Windows service restart policy never kicks in. See this ticket: #57

@kc7bfi
Copy link
Author

kc7bfi commented Jan 29, 2019 via email

@bdw429s
Copy link

bdw429s commented Jan 29, 2019

Thanks for the follow up @kc7bfi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants