---
title: "安装jboss为服务"
author: "thinkact"
date: "2008-12-01T23:14:35Z"
tags: []
categories: ["企业架构"]
slug: "jboss"
draft: false
lastmod: "2008-12-01T23:17:53Z"
id: 284414
url: "https://thinkact.iteye.com/blog/284414"
---

1, http://javaservice.objectweb.org/ 这里可以下载javaservice 的程序包

2, 下载完毕后, 在解压后的目录中,有bin和docs两个目录 在doc目录下有 description.html这个文件

打开,找到Example (JBoss 3.0) 根据其描述一步一步进行即可完成.

3 To install a Java application as a Windows service, you need the following information: service\_name Service name to be used for the installed application (i.e. MyJavaService) jvm\_location Java Run-Time Environment location (reference to jvm.dll) start\_class Java Application program entry point class name (i.e. mypackage.MyClass) start\_method (optional, default main) Java Application program entry point method name (i.e. startservice) start\_params (optional, no defaults) Java Application program startup parameters

4， example:

注意环境变量要正确设置

JBossService.exe -install JBoss %JAVA\_HOME%jrebinserverjvm.dll -Djava.class.path=%JAVA\_HOME%libtools.jar;%JBOSS\_BIN%run.jar -start org.jboss.Main -stop org.jboss.Main -method systemExit -params "-Xms128m -Xmx256m -Xss128k" -out %JBOSS\_BIN%stdout.log -err %JBOSS\_BIN%stderr.log -current %JBOSS\_BIN% -manual -overwrite -startup 10