{"id":220,"date":"2009-01-15T11:45:16","date_gmt":"2009-01-15T15:45:16","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=220"},"modified":"2009-02-18T14:35:44","modified_gmt":"2009-02-18T19:35:44","slug":"jboss-as-a-windows-service","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=220","title":{"rendered":"JBoss as a Windows Service"},"content":{"rendered":"<p>*Download Java Service Wrapper from <a href=\"http:\/\/wrapper.tanukisoftware.org\/doc\/english\/download.jsp\">here<\/a><\/p>\n<p>*Set env variables<\/p>\n<pre>JAVA_HOME=\r\nJBOSS_HOME=<\/pre>\n<p>*Copy the following files into the JBoss bin directory: <\/p>\n<pre>{WRAPPER_HOME}\\bin\\Wrapper.exe\r\n{WRAPPER_HOME}\\src\\bin\\App.bat.in\r\n{WRAPPER_HOME}\\src\\bin\\InstallApp-NT.bat.in\r\n{WRAPPER_HOME}\\src\\bin\\UninstallApp-NT.bat.in<\/pre>\n<p>*Rename the three batch files as follows.<br \/>\nBe sure to remove the .in extensions so that the files all end in .bat.<br \/>\nDepending on how your file explorer is configured,<br \/>\nyou may not be able to see the extensions. <\/p>\n<pre>{JBOSS_HOME}\\bin\\JBoss.bat\r\n{JBOSS_HOME}\\bin\\InstallJBoss-NT.bat\r\n{JBOSS_HOME}\\bin\\UninstallJBoss-NT.bat<\/pre>\n<p>*Copy the following two files into the JBoss lib directory: <\/p>\n<pre>{WRAPPER_HOME}\\server\\default\\lib\\Wrapper.DLL\r\n{WRAPPER_HOME}\\server\\default\\lib\\wrapper.jar<\/pre>\n<p>*Copy <\/p>\n<pre>{WRAPPER_HOME}\\src\\conf\\wrapper.conf.in<\/pre>\n<p>to<\/p>\n<pre>{JBOSS_HOME}\\server\\default\\conf\\wrapper.conf<\/pre>\n<p>*Modify InstallJBoss-NT.bat and UninstallJBoss-NT.bat to reflect the wrapper.conf location (default wrapper.conf location is ..\/conf\/wrapper.conf)<\/p>\n<pre>set _WRAPPER_CONF=\"%JBOSS_HOME%\\server\\default\\conf\\wrapper.conf\"<\/pre>\n<p>*Edit wrapper.conf<\/p>\n<pre>wrapper.java.command=%JAVA_HOME%\/bin\/java\r\nwrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp\r\nwrapper.java.classpath.1=%JBOSS_HOME%\/server\/default\/lib\/wrapper.jar\r\nwrapper.java.classpath.2=%JAVA_HOME%\/lib\/tools.jar\r\nwrapper.java.classpath.3=%JBOSS_HOME%\/bin\/run.jar\r\nwrapper.java.library.path.1=%JBOSS_HOME%\/server\/default\/lib\r\nwrapper.java.additional.1=-server\r\nwrapper.java.additional.2=-XX:PermSize=64M\r\nwrapper.java.additional.3=-XX:MaxPermSize=256M\r\nwrapper.java.initmemory=256\r\nwrapper.java.maxmemory=512\r\nwrapper.app.parameter.1=org.jboss.Main\r\nwrapper.console.format=PM\r\nwrapper.console.loglevel=INFO\r\nwrapper.logfile=%JBOSS_HOME%\/server\/default\/log\/wrapper.log\r\nwrapper.logfile.format=LPTM\r\nwrapper.logfile.loglevel=INFO\r\nwrapper.logfile.maxsize=0\r\nwrapper.logfile.maxfiles=0\r\nwrapper.syslog.loglevel=NONE\r\nwrapper.console.title=JBoss Server\r\nwrapper.ntservice.name=JBoss\r\nwrapper.ntservice.displayname=JBoss Server\r\nwrapper.ntservice.description=JBoss Server\r\nwrapper.ntservice.dependency.1=\r\nwrapper.ntservice.starttype=AUTO_START\r\nwrapper.ntservice.interactive=false<\/pre>\n<p>*Install JBoss service<br \/>\n{JBOSS_HOME}\\bin\\InstallJBoss-NT.bat<\/p>\n<p>*Uninstall JBoss service<br \/>\n{JBOSS_HOME}\\bin\\UninstallJBoss-NT.bat<\/p>\n","protected":false},"excerpt":{"rendered":"<p>*Download Java Service Wrapper from here *Set env variables JAVA_HOME= JBOSS_HOME= *Copy the following files into the JBoss bin directory: {WRAPPER_HOME}\\bin\\Wrapper.exe {WRAPPER_HOME}\\src\\bin\\App.bat.in {WRAPPER_HOME}\\src\\bin\\InstallApp-NT.bat.in {WRAPPER_HOME}\\src\\bin\\UninstallApp-NT.bat.in *Rename the three batch files as follows. Be sure to remove the .in extensions so that &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=220\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[30],"tags":[],"class_list":["post-220","post","type-post","status-publish","format-standard","hentry","category-jboss"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-3y","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=220"}],"version-history":[{"count":2,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/220\/revisions"}],"predecessor-version":[{"id":556,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/220\/revisions\/556"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}