当前位置:编程学习 > JAVA >>

virgo-kernel-3.6.2.RELEASE 作为windows 服务

使用wrapper http://sourceforge.net/projects/wrapper/

wrapper的config内容:

......

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=%VIRGO_HOME%/lib/*.jar
wrapper.java.classpath.2=%VIRGO_HOME%/lib/persistence/*.jar
wrapper.java.classpath.3=%VIRGO_HOME%/plugins/org.eclipse.osgi_3.8.1.v20120830-144521.jar
wrapper.java.classpath.4=%VIRGO_HOME%/plugins/org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib

# Java Bits.  On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
wrapper.java.additional.auto_bits=TRUE

# Java Additional Parameters
wrapper.java.additional.1=-Dcom.sun.management.jmxremote.port=9876
wrapper.java.additional.2=-Dcom.sun.management.jmxremote.authenticate=true
wrapper.java.additional.3=-Dcom.sun.management.jmxremote.login.config=virgo-kernel
wrapper.java.additional.4=-Dcom.sun.management.jmxremote.access.file="%VIRGO_HOME%/configuration/org.eclipse.virgo.kernel.jmxremote.access.properties"
wrapper.java.additional.5=-Djavax.net.ssl.keyStore="%VIRGO_HOME%/configuration/keystore"
wrapper.java.additional.6=-Djavax.net.ssl.keyStorePassword=changeit
wrapper.java.additional.7=-Dcom.sun.management.jmxremote.ssl=true
wrapper.java.additional.8=-Dcom.sun.management.jmxremote.ssl.need.client.auth=false
wrapper.java.additional.9=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.10=-XX:ErrorFile="%VIRGO_HOME%/serviceability/error.log"
wrapper.java.additional.11=-XX:HeapDumpPath="%VIRGO_HOME%/serviceability/heap_dump.hprof"
wrapper.java.additional.12=-Djava.security.auth.login.config="%VIRGO_HOME%/configuration/org.eclipse.virgo.kernel.authentication.config"
wrapper.java.additional.13=-Dorg.eclipse.virgo.kernel.authentication.file="%VIRGO_HOME%/configuration/org.eclipse.virgo.kernel.users.properties"
wrapper.java.additional.14=-Djava.io.tmpdir="%VIRGO_HOME%/work/tmp"
wrapper.java.additional.15=-Dorg.eclipse.virgo.kernel.home="%VIRGO_HOME%"
wrapper.java.additional.16=-Dosgi.java.profile="%VIRGO_HOME%/configuration/java6-server.profile"
wrapper.java.additional.17=-Dssh.server.keystore="%VIRGO_HOME%/configuration/hostkey.ser"
wrapper.java.additional.18=-Dorg.eclipse.virgo.kernel.config="%VIRGO_HOME%/configuration"
wrapper.java.additional.19=-Dosgi.sharedConfiguration.area="%VIRGO_HOME%/configuration"
wrapper.java.additional.20=-Declipse.ignoreApp="true"
wrapper.java.additional.21=-Dosgi.install.area="%VIRGO_HOME%"
wrapper.java.additional.22=-Dosgi.configuration.area="%VIRGO_HOME%/work"
wrapper.java.additional.23=-Dosgi.frameworkClassPath="file:/%VIRGO_HOME%/lib/org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar,file:/%VIRGO_HOME%/lib/org.eclipse.virgo.kernel.equinox.extensions_3.6.2.RELEASE.jar,file:/%VIRGO_HOME%/lib/org.eclipse.virgo.nano.authentication_3.6.2.RELEASE.jar,file:/%VIRGO_HOME%/lib/org.eclipse.virgo.nano.shutdown_3.6.2.RELEASE.jar,file:/%VIRGO_HOME%/lib/org.eclipse.virgo.util.env_3.6.2.RELEASE.jar,file:/%VIRGO_HOME%/plugins/org.eclipse.osgi_3.8.1.v20120830-144521.jar,file:/%VIRGO_HOME%/plugins/org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jar,file:/%VIRGO_HOME/plugins\org.eclipse.equinox.cm_1.0.400.v20120319-2029.jar%"
wrapper.java.additional.24=-Djava.endorsed.dirs="%VIRGO_HOME%/lib/endorsed"
wrapper.java.additional.25=-Xmx512m
wrapper.java.additional.26=-XX:MaxPermSize=512m

# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3

# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=org.eclipse.equinox.launcher.Main
wrapper.app.parameter.2=-noExit

..........
--------------------编程问答-------------------- Caused by: java.io.FileNotFoundException: plugins\org.eclipse.equinox.cm_1.0.400.v20120319-2029.jar  --------------------编程问答-------------------- wrapper.java.additional.23=知道的路径下,少文件,或者名字写错。 --------------------编程问答-------------------- 应该是wrapper.java.additional.23="" 把等号后面的引号去掉就可以了。
补充:Java ,  Java EE
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,