I'm going to assume the following:
- GlassFish is installed to c:\GlassFishv3
- The GlassFish bin directory has been added to your path (c:\GlassFishv3\bin)
- GlassFish 3.0.1
right now down to it, run the following statement:
asadmin create-service
asadmin create-service

Easy enough, but I don't like the service name domain1 - as it is rather uninformative, I would much prefer a name like say GlassFish
cd glassfishv3\glassfish\domains\domain1\bin notepad domain1Service.xml
This shows a file something like this
The important elements for us are thesedomain1 domain1 GlassFish Server GlassFish Server C:/glassfishv3/glassfish/bin/asadmin.bat C:/glassfishv3/glassfish/domains/domain1/bin reset tcpip start-domain --verbose --domaindir C:/glassfishv3/glassfish/domains domain1 stop-domain --domaindir C:/glassfishv3/glassfish/domains domain1
Lets Change them to something more friendly likedomain1 domain1 GlassFish Server GlassFish Server
Or whatever fits your needs.GlassFish 3.0.1 GlassFish 3.0.1 GlassFish 3.0.1 Server
Right now to round it off, run the thiese last 2 commands
Cd glassfish\3.0.1\glassfish\domains\domain1\bin domain1Service.exe uninstall domain1Service.exe install
You now have GlassFish installed with a service name of your choosing.
Very good post! Helped a lot!
ReplyDeleteThanks!
very nice. thanks for article.
ReplyDeleteThanks a lot. However, I didn't have a domain1Service.xml until after I created the service. Otherwise, great post!
ReplyDelete