Glassfish v3 as Windows Service
That’s is something simple but I’ve taken a long time to figure out how to set my Glassfish v3 server as a Windows Service.
After a long time doing google searching, I came across a simple solution. All that you need to do is enter in your Glassfish v3 bin directory and run the command:
c:\glassfishv3\bin\asadmin create-service
Yeah! Just it will work!
I hope this tip be useful for you too!
See you . . .
Advertisement
A quick google search brought this up and you saved me countless headaches. Thanks.
For this simple answer i googled and searched the sun and oracle pages, with no result.
perhaps they are considering this as beta-information, but the solution given here is very relevant. Thanks
This saved me a lot of time! Thanks a lot.
You just saved me a ton of work. Cheers!
Very good, I had try other ways that don’t worked, but this time worked fine. Thank’s.
Why i don’t enter to this site first?
thank you, i lost a lot of time finding and now you save my ass
Vlw cara ajudou d+!!!
u rocks!!
Didn’t work at first, but after running command prompt as administrator, it did.
so i got the service installed but when i start i get this error: Windows could not start the domain1 GlassFish Server service on Local Computer. Error 1067: The process terminated unexpectedly. I’m using glassfish 3.0.1 and windows 7.
Wondering if anyone knows what’s up…
Hi James, I’ve never tested this on Windows 7. I believe for Windows 7 you should use another process
Thanks for the response. Any chance u would know what the windows 7 process is? The process described here is for windows xp/2003 server? I’m wondering if it was necessary to have set the JAVA_HOME system variable to my jdk root for the service to start correctly. Thanks for any help u can offer.
Yeah! That was for Windows XP/2003 server. You can try to set the JAVA_HOME, but to work on Windows XP/2003 server that is not necessary. I don’t have a Windows 7 here to test. Try that. Good luck
I am on windows vista, I have the exactly same problem. But in my case. restarting didn’t fixed it. Any help?
Okay found the issue… just have to restart the computer
Cheers all!!!
Ok, I managed to fix this. It’s actually a fix I didn’t find anywhere, so I hope it will help others. It was a spaces problem. So I edited the doimain1Service.xml and added quotes in the path parameters, like so
“C:/Program Files/glassfish-3.0.1/glassfish/domains”
same for
You can’t imagine how long I’ve searched for this solution. Can’t believe it was this simple, thanks a lot. You’ve saved me a lot of trouble.
Radu u r great!!!!!!!!! thanks!!!
well i have window 2003 server.
i can create it but when i stop, it is hanging.
error like service does not stop in time fashion way.
then it hang, i have to kill process “java.exe” so i can restart it backup.
Any suggestion?
Hi, sorry but I have not tested this on window 2003 server.
find a way around if some one like
using
domain1Service.exe stop
taskkill /f /im java.exe
and it work!!!
Thanks a lot!
We’ve been googling and doing scripts for this one with no results. This is a big help. The easiest way.
Thumbs up!
Thanks ! You just made my day