In most cases, we are running JBoss continuously.
How to ensure that it will continue to run without external interference?
Under UNIX / Linux, you should be completed by shell
So under Windows?
I want to achieve this purpose to install JBoss as system services.
And JBoss itself or Windows itself does not provide a way to install as a service.
This goal needs to be used in additional methods.
For example, write C / C program calls Windows API
This may be a waste of time
Now I have supported this in the Project of Open Source.
http://javaservice.Objectweb.org/
Here you can download the JavaService package
After the download is complete,
In the decompressed directory, there are bin and DOCS two directory
There is DESCRIPTION.html in the DOC directory.
Open, find Example (jboss 3.0)
The step is performed according to the step by step.
Description:
The Windows operating system of the installation service must be NT core, for example: NT 2000 XP 2003
These doing
But Win98 is not
In the third step of the description, some places need to change
JBossService.exe -install jboss
{JDK_HOME} / jre / bin / {hotspot | server | classic} /jvm.dll
-Djava.class.path = {jdk_home} /lib/tools.jar; {jboss_bin} /Run.jar
-start Org.jboss.main
-stop org.jboss.main -method systemExit
-Out {jboss_bin} /stdout.log
-err {jboss_bin} /stderr.log
-current {jboss_bin}
-depends mysql
-manual
Here {JDK_HOME} To change your actual JDK path
{Jboss_bin}: This is replaced by the path to the actual JBoss
After running, it will be prompted to be successfully installed - if you haven't installed before
But this time the service is started by manual,
If you want to automatically run JBoss service,
You can find JBoss in the Control Panel -> Administrative Tools -> Services to modify its launch type