I downloaded the bundle and used the service.bat file you provided but get the following error when trying to install the service:
[427 prunsrv.c] [error] The operation completed successfully
[1336 prunsrv.c] [error] Load configuration failed
Service JBoss Application Server 7.0 installed
If I change your batch file to use jbosssvc.exe rather than jbossweb.x64.exe then the service is installed and starts up just fine however after a minute or two I always get an out of memory error. If I just start the server by manually calling standalone.bat then the server runs great and never gets an out of memory error. Any idea why jbossweb.x64.exe doesn't work, or why running it as a service results in out of memory errors while running it manually does not?
I changed line 84 in service.bat (the call to shutdown) to this :
call jboss-admin.bat --connect command=:shutdown >> shutdown.log 2>&1
This enables the application server to shut down cleanly but will only work if the native management interface is not secured.
It's best to do the same with line 94 (restart service).
There is no more shutdown.bat file, that is probably the reason the system shuts down.
It turns out that stopping the service does not always work the way it should (it hangs and eventually fails but the application server is stopped nevertheless), so there is still something wrong in my change to service.bat.
Check your run.log for what the true JAVA_OPTS are. service.bat calls standalone.conf.bat but then overwrites stuff with JAVA_OPTS=-Xrs, defaulting the memory settings.
Thank you for your post. I noticed that the second instance of the shutdown line is not commented out in the restart section of your attached service.bat file (just something for others to be aware of):
call shutdown -S < .s.lock >> shutdown.log 2>&1
Both instances of this line are still present in the service.bat file included in the jboss-native-2.0.10-windows-x64-ssl.zip available from:
Also, the following post was very helpful in setting up JBoss 7.1.1 as a service on a Windows x64 platform:
What about version 7.1.1.Final? service.bat is not there any more. Anybody ever tried this in 7.1.1 version?
service.bat was bundles with AS6 but for AS7 you need to extract the native connectors into the bin folder.
Thanks Nicklas, but can you explain a little more clear - what do you mean by extracting the native connectors into the bin folder?
Download appriopriate binaries from http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-10
You will see it contains a bin folder which means if you extract the zip in the <JBOSS_HOME> directory, service.bat will be placed (correctly) in the bin folder.
One thing to confirm before continuing this: can different windosw OS apply the same setting to make the service run? for example windows XP or windows 7?
Should (tm) work with all windowses (make sure the 32/64bit version of the connector is correct, though)
Yes, I have set this up with JBoss 7.1.1.Final and it works. Take a look at https://community.jboss.org/message/724488. It has great step-by-step instructions. As for the Windows version, you just need to make sure that you download either the 32-bit or 64-bit version of the connector to match your OS, as Nicklas pointed out.
I was able to get this running using java service wrapper from Tanuki Software. I described the process here: http://canotech.wordpress.com/2012/08/10/running-jboss7-in-service-mode-using-java-service-wrapper/