Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Javaservice and JBoss setup - JBoss as a windows service

843841Aug 5 2005 — edited Oct 17 2008
I've recently had to wade through the setup of JBoss as a Windows service, and thought it would be useful if we (that is, you and me) post up the javaservice script files for other newbie�s to try, learn and understand.

To get things kicked off, if you intend to run ANY java application as a service, I woul recommend using javaservice (I did try the java service wrapper, but eventually gave up):

Information: http://www.multiplan.co.uk/software/javaservice/index.html
Download: http://forge.objectweb.org/project/showfiles.php?group_id=137
Installation: http://www.multiplan.co.uk/software/javaservice/docs/index.html

To determine which jvm DLL to use, see the following post:
http://forum.java.sun.com/thread.jspa?forumID=33&threadID=527159.

And now, here's the installation script I used (note that I rename the javaservice executable to JBossService.exe):
JBossService.exe -install JBoss 
%JAVA_HOME%\jre\bin\server\jvm.dll 
-Dprogram.name=run.bat 
-Xms128m 
-Xmx512m 
-Djava.endorsed.dirs=%JBOSS_HOME%\lib\endorsed 
-Djava.class.path="%JAVA_HOME%\lib\tools.jar;%JBOSS_HOME%\bin\run.jar" 
-start org.jboss.Main 
-stop org.jboss.Main 
-method systemExit 
-out %JBOSS_HOME%\log\stdout.log 
-err %JBOSS_HOME%\log\stderr.log
-make sure that the %JBOSS_HOME%\log directory exists.

The script above should work on any machine with JBoss installed, as long as you have JBOSS_HOME and JAVA_HOME setup correctly.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2008
Added on Aug 5 2005
4 comments
742 views