Inputttttt
2017-06-30 04:49
采纳率: 33.3%
浏览 1.4k
已采纳

如何将java程序注册成本地的服务,那个wrapper怎么用?来大神帮我看看啊

我要将一个idea写的java程序注册成本地的服务,一直在本地运行那种,现在我弄成本地的服务了,但是运行一次就挂掉,可以加qq1074098646聊下

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

5条回答 默认 最新

  • Inputttttt 2017-06-30 04:59
    已采纳

    我按照百度的方法http://blog.csdn.net/coolcoffee168/article/details/9980009做了一下,可惜没有成功下面是报的日志STATUS | wrapper | 2017/06/30 12:59:27 | --> Wrapper Started as Console
    STATUS | wrapper | 2017/06/30 12:59:27 | Java Service Wrapper Standard Edition 64-bit 3.5.32
    STATUS | wrapper | 2017/06/30 12:59:27 | Copyright (C) 1999-2017 Tanuki Software, Ltd. All Rights Reserved.
    STATUS | wrapper | 2017/06/30 12:59:27 | http://wrapper.tanukisoftware.com
    STATUS | wrapper | 2017/06/30 12:59:27 |
    ERROR | wrapper | 2017/06/30 12:59:27 | License Error:
    ERROR | wrapper | 2017/06/30 12:59:27 | A valid license was not found in the Wrapper configuration file.
    ERROR | wrapper | 2017/06/30 12:59:27 |
    ERROR | wrapper | 2017/06/30 12:59:27 | The Java Service Wrapper requires a License Key to activate the
    ERROR | wrapper | 2017/06/30 12:59:27 | software. License Keys can be purchased on the Java Service Wrapper
    ERROR | wrapper | 2017/06/30 12:59:27 | web site:
    ERROR | wrapper | 2017/06/30 12:59:27 | http://wrapper.tanukisoftware.com/purchase
    ERROR | wrapper | 2017/06/30 12:59:27 |
    ERROR | wrapper | 2017/06/30 12:59:27 | You can also immediately obtain a one-month Free trial license:
    ERROR | wrapper | 2017/06/30 12:59:27 | http://wrapper.tanukisoftware.com/trial
    ERROR | wrapper | 2017/06/30 12:59:27 |
    ERROR | wrapper | 2017/06/30 12:59:27 | License Keys can be generated for the following HostId:
    ERROR | wrapper | 2017/06/30 12:59:27 | HostId #1: 7446a087f8a5
    ERROR | wrapper | 2017/06/30 12:59:27 |
    ERROR | wrapper | 2017/06/30 12:59:27 |
    ERROR | wrapper | 2017/06/30 12:59:27 | Optional host name for license: c
    STATUS | wrapper | 2017/06/30 12:59:27 | <-- Wrapper Stopped
    STATUS | wrapper | 2017/06/30 13:00:24 | --> Wrapper Started as Console
    STATUS | wrapper | 2017/06/30 13:00:24 | Java Service Wrapper Community Edition 32-bit 3.5.32
    STATUS | wrapper | 2017/06/30 13:00:24 | Copyright (C) 1999-2017 Tanuki Software, Ltd. All Rights Reserved.
    STATUS | wrapper | 2017/06/30 13:00:24 | http://wrapper.tanukisoftware.com
    STATUS | wrapper | 2017/06/30 13:00:24 |
    STATUS | wrapper | 2017/06/30 13:00:25 | Launching a JVM...
    FATAL | wrapper | 2017/06/30 13:00:25 | Unable to execute Java command. 拒绝访问。 (0x5)
    FATAL | wrapper | 2017/06/30 13:00:25 | "C:\Program Files (x86)\Java\jdk1.7.0_01\bin" -Djava.library.path="../lib" -classpath "../lib/wrapper.jar;../lib/xml-apis-1.3.04.jar;../lib/xercesImpl-2.9.1.jar;../lib/xbean-reflect-3.4.jar;../lib/velocity-tools-2.0.jar;../lib/velocity-1.5.jar;../lib/surefire-booter-2.12.4.jar;../lib/surefire-api-2.12.4.jar;../lib/struts-tiles-1.3.8.jar;../lib/struts-taglib-1.3.8.jar;../lib/struts-core-1.3.8.jar;../lib/sslext-1.2-0.jar;../lib/slf4j-jdk14-1.5.6.jar;../lib/slf4j-api-1.5.6.jar;../lib/sisu-inject-bean-1.4.2.jar;../lib/sisu-guice-2.1.7-noaop.jar;../lib/servlet-api-2.5-20081211.jar;../lib/servlet-api-2.5.jar;../lib/plexus-velocity-1.1.8.jar;../lib/plexus-io-1.0.jar;../lib/plexus-utils-3.0.8.jar;../lib/plexus-sec-dispatcher-1.3.jar;../lib/plexus-interpolation-1.15.jar;../lib/plexus-interactivity-api-1.0-alpha-4.jar;../lib/plexus-i18n-1.0-beta-7.jar;../lib/plexus-digest-1.0.jar;../lib/plexus-component-annotations-1.5.5.jar;../lib/plexus-compiler-manager-2.5.jar;../lib/plexus-compiler-javac-2.5.jar;../lib/plexus-compiler-api-2.5.jar;../lib/plexus-cipher-1.4.jar;../lib/plexus-build-api-0.0.4.jar;../lib/plexus-archiver-2.1.jar;../lib/pegdown-1.2.1.jar;../lib/parboiled-java-1.1.4.jar;../lib/oro-2.0.8.jar;../lib/log4j-1.2.12.jar;../lib/junit-dep-4.9.jar;../lib/junit-3.8.2.jar;../lib/jsr305-2.0.1.jar;../lib/jetty-util-6.1.25.jar;../lib/jetty-6.1.25.jar;../lib/jcl-over-slf4j-1.5.6.jar;../lib/jackson-databind-2.8.4.jar;../lib/jackson-core-2.8.9.jar;../lib/jackson-annotations-2.8.8.jar;../lib/httpcore-4.0.1.jar;../lib/httpclient-4.0.2.jar;../lib/hamcrest-core-1.1.jar;../lib/google-collections-1.0.jar;../lib/doxia-site-renderer-1.4.jar;../lib/doxia-sink-api-1.4.jar;../lib/doxia-sink-api-1.0-alpha-7.jar;../lib/doxia-module-xhtml-1.4.jar;../lib/doxia-module-xdoc-1.4.jar;../lib/doxia-module-markdown-1.4.jar;../lib/doxia-module-fml-1.4.jar;../lib/doxia-logging-api-1.4.jar;../lib/doxia-integration-tools-1.5.jar;../lib/doxia-decoration-model-1.4.jar;../lib/doxia-core-1.4.jar;../lib/dom4j-1.1.jar;../lib/demo.jar;../lib/commons-validator-1.3.1.jar;../lib/commons-logging-api-1.1.jar;../lib/commons-logging-1.1.1.jar;../lib/commons-lang3-3.1.jar;../lib/commons-lang-2.5.jar;../lib/commons-io-1.4.jar;../lib/commons-digester-1.8.jar;../lib/commons-collections-3.2.1.jar;../lib/commons-codec-1.3.jar;../lib/commons-cli-1.0.jar;../lib/commons-chain-1.1.jar;../lib/commons-beanutils-1.7.0.jar;../lib/backport-util-concurrent-3.1.jar;../lib/asm-util-4.1.jar;../lib/asm-tree-4.1.jar;../lib/asm-analysis-4.1.jar;../lib/asm-4.1.jar;../lib/antlr-2.7.2.jar;../lib/aether-util-1.7.jar;../lib/aether-util-0.9.0.M2.jar" -Dwrapper.key="FUZGkZjTyiFIUIGl" -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=51600 -Dwrapper.version="3.5.32" -Dwrapper.native_library="wrapper" -Dwrapper.arch="x86" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp com.brt.monkey.app.action.MainTest
    ADVICE | wrapper | 2017/06/30 13:00:25 |
    ADVICE | wrapper | 2017/06/30 13:00:25 | --------------------------------------------------------------------
    ADVICE | wrapper | 2017/06/30 13:00:25 | Advice:
    ADVICE | wrapper | 2017/06/30 13:00:25 | Access denied errors when attempting to launch the Java process are
    ADVICE | wrapper | 2017/06/30 13:00:25 | usually caused by strict access permissions assigned to the
    ADVICE | wrapper | 2017/06/30 13:00:25 | directory in which Java is installed.
    ADVICE | wrapper | 2017/06/30 13:00:25 | --------------------------------------------------------------------
    ADVICE | wrapper | 2017/06/30 13:00:25 |
    STATUS | wrapper | 2017/06/30 13:00:25 | <-- Wrapper Stopped

    点赞 打赏 评论
  • Inputttttt 2017-06-30 06:01

    哇,我这个好像弄上了,在本地的服务里已经有了但是一运行就会停止,程序里面找不到一个token.property文件这个文件在我把程序打jar包的时候怎么办,他不会自动打在里面 下面是日志STATUS | wrapper | 2017/06/30 13:46:34 | Launching a JVM...
    INFO | jvm 1 | 2017/06/30 13:46:34 | WrapperManager: Initializing...
    INFO | jvm 1 | 2017/06/30 13:46:34 | {"data":{"body":"2F1B60E8C4F3A9F016C24D487BA4696C16DC2CDE942A78DBF3C16A7A747BC5BDCE67C998F5AD79A72C4BB947F42B616A4DFBE96ABCA7944140F2B2804B9BD245666633A13477123F1036495EEAB8B6555BF5CDF64E616CA809D24D9A3321E445","header":{"resCode":"1","resMsg":"登陆成功!","sign":"28b980e8d9464e7b57a04bc7acfc5f97","timestamp":1498801652082},"version":1.0}}
    INFO | jvm 1 | 2017/06/30 13:46:34 |
    INFO | jvm 1 | 2017/06/30 13:46:34 | RspData [data=Data [body=2F1B60E8C4F3A9F016C24D487BA4696C16DC2CDE942A78DBF3C16A7A747BC5BDCE67C998F5AD79A72C4BB947F42B616A4DFBE96ABCA7944140F2B2804B9BD245666633A13477123F1036495EEAB8B6555BF5CDF64E616CA809D24D9A3321E445, version=1.0, header=RspHeader [resCode=1, sign=28b980e8d9464e7b57a04bc7acfc5f97, resMsg=登陆成功!, timestamp=1498801652082]]]
    INFO | jvm 1 | 2017/06/30 13:46:34 | sign==>>083dffb0788b31e1754a54a09f4402b4
    INFO | jvm 1 | 2017/06/30 13:46:34 | keyFinal==>>fde38dbcf2d6bd013302109ad5163e54
    INFO | jvm 1 | 2017/06/30 13:46:34 | {"token":"bd7432c5ae6c25ad41ea4f1b75218f26","channelId":"4823017916041537875","userId":"32"}
    INFO | jvm 1 | 2017/06/30 13:46:34 | RspData [data=Data [body=2F1B60E8C4F3A9F016C24D487BA4696C16DC2CDE942A78DBF3C16A7A747BC5BDCE67C998F5AD79A72C4BB947F42B616A4DFBE96ABCA7944140F2B2804B9BD245666633A13477123F1036495EEAB8B6555BF5CDF64E616CA809D24D9A3321E445, version=1.0, header=RspHeader [resCode=1, sign=28b980e8d9464e7b57a04bc7acfc5f97, resMsg=登陆成功!, timestamp=1498801652082]]]
    INFO | jvm 1 | 2017/06/30 13:46:34 | java.io.FileNotFoundException: token.properties (系统找不到指定的文件。)
    INFO | jvm 1 | 2017/06/30 13:46:34 | at java.io.FileInputStream.open(Native Method)
    INFO | jvm 1 | 2017/06/30 13:46:34 | at java.io.FileInputStream.(FileInputStream.java:138)
    INFO | jvm 1 | 2017/06/30 13:46:34 | at java.io.FileInputStream.(FileInputStream.java:97)
    INFO | jvm 1 | 2017/06/30 13:46:34 | at java.io.FileReader.(FileReader.java:58)
    INFO | jvm 1 | 2017/06/30 13:46:34 | at com.brt.monkey.app.action.MainTest.(MainTest.java:149)
    INFO | jvm 1 | 2017/06/30 13:46:34 | at java.lang.Class.forName0(Native Method)
    INFO | jvm 1 | 2017/06/30 13:46:34 | at java.lang.Class.forName(Class.java:186)
    INFO | jvm 1 | 2017/06/30 13:46:34 | at org.tanukisoftware.wrapper.WrapperSimpleApp.(WrapperSimpleApp.java:211)
    INFO | jvm 1 | 2017/06/30 13:46:34 | at org.tanukisoftware.wrapper.WrapperSimpleApp.main(WrapperSimpleApp.java:624)
    STATUS | wrapper | 2017/06/30 13:46:37 | <-- Wrapper Stopped
    STATUS | wrapperm | 2017/06/30 13:49:21 | Test Wrapper Sample Application service installed.
    STATUS | wrapper | 2017/06/30 13:50:44 | --> Wrapper Started as Service
    STATUS | wrapper | 2017/06/30 13:50:45 | Java Service Wrapper Community Edition 32-bit 3.5.32
    STATUS | wrapper | 2017/06/30 13:50:45 | Copyright (C) 1999-2017 Tanuki Software, Ltd. All Rights Reserved.
    STATUS | wrapper | 2017/06/30 13:50:45 | http://wrapper.tanukisoftware.com
    STATUS | wrapper | 2017/06/30 13:50:45 |
    STATUS | wrapper | 2017/06/30 13:50:46 | Launching a JVM...
    INFO | jvm 1 | 2017/06/30 13:50:47 | WrapperManager: Initializing...
    STATUS | wrapper | 2017/06/30 13:50:52 | <-- Wrapper Stopped

    点赞 打赏 评论
  • _1_1_7_ 2017-06-30 06:22

    jar包中的文件用Class.getResourceAsStream(String path) 方法读取
    http://riddickbryant.iteye.com/blog/436693

    点赞 打赏 评论
  • 黄河默默 2017-06-30 07:10
    点赞 打赏 评论
  • 黄河默默 2017-06-30 07:22

    我注册的是 tomcat 服务

    点赞 打赏 评论

相关推荐 更多相似问题