Hellow。
今天我第一次尝试在OS中使用jar创建服务。 我尝试使用 java包装器社区版3.5.29
在Windows中创建test_service即可。 对于下一步,我尝试启动新的test_service。 服务尝试启动和关闭。 在日志中JAVA WRAPPER有这个信息。
STATUS | wrapper | 2016/07/19 11:53:21 | --> Wrapper Started as Service
STATUS | wrapper | 2016/07/19 11:53:21 | Java Service Wrapper Community Edition 32-bit 3.5.29
STATUS | wrapper | 2016/07/19 11:53:21 | Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2016/07/19 11:53:21 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2016/07/19 11:53:21 |
STATUS | wrapper | 2016/07/19 11:53:22 | Launching a JVM...
INFO | jvm 1 | 2016/07/19 11:53:22 | [11:53:22 19.07.2016]: Starting Oracle.
INFO | jvm 1 | 2016/07/19 11:53:22 | [11:53:22 19.07.2016]: Try Update.
INFO | jvm 1 | 2016/07/19 11:53:22 | [11:53:22 19.07.2016]: Update OK.
ERROR | wrapper | 2016/07/19 11:54:21 | Startup failed: Timed out waiting for a signal from the JVM.
ADVICE | wrapper | 2016/07/19 11:54:21 |
ADVICE | wrapper | 2016/07/19 11:54:21 | ------------------------------------------------------------------------
ADVICE | wrapper | 2016/07/19 11:54:21 | Advice:
ADVICE | wrapper | 2016/07/19 11:54:21 | The Wrapper consists of a native component as well as a set of classes
ADVICE | wrapper | 2016/07/19 11:54:21 | which run within the JVM that it launches. The Java component of the
ADVICE | wrapper | 2016/07/19 11:54:21 | Wrapper must be initialized promptly after the JVM is launched or the
ADVICE | wrapper | 2016/07/19 11:54:21 | Wrapper will timeout, as just happened. Most likely the main class
ADVICE | wrapper | 2016/07/19 11:54:21 | specified in the Wrapper configuration file is not correctly initializing
ADVICE | wrapper | 2016/07/19 11:54:21 | the Wrapper classes:
ADVICE | wrapper | 2016/07/19 11:54:21 | COM.MainRunner
ADVICE | wrapper | 2016/07/19 11:54:21 | While it is possible to do so manually, the Wrapper ships with helper
ADVICE | wrapper | 2016/07/19 11:54:21 | classes to make this initialization processes automatic.
ADVICE | wrapper | 2016/07/19 11:54:21 | Please review the integration section of the Wrapper's documentation
ADVICE | wrapper | 2016/07/19 11:54:21 | for the various methods which can be employed to launch an application
ADVICE | wrapper | 2016/07/19 11:54:21 | within the Wrapper:
ADVICE | wrapper | 2016/07/19 11:54:21 | http://wrapper.tanukisoftware.com/doc/english/integrate.html
ADVICE | wrapper | 2016/07/19 11:54:21 | ------------------------------------------------------------------------
ADVICE | wrapper | 2016/07/19 11:54:21 |
ERROR | wrapper | 2016/07/19 11:54:21 | JVM did not exit on request, termination requested.
STATUS | wrapper | 2016/07/19 11:54:21 | JVM exited after being requested to terminate.
STATUS | wrapper | 2016/07/19 11:54:26 | Launching a JVM...
INFO | jvm 2 | 2016/07/19 11:54:26 | [11:54:26 19.07.2016]: Starting Oracle.
INFO | jvm 2 | 2016/07/19 11:54:26 | [11:54:26 19.07.2016]: Try Update.
INFO | jvm 2 | 2016/07/19 11:54:27 | [11:54:26 19.07.2016]: Update OK.
如果我在我的类COM.MainRunner中理解正确,在Wrapper上没有一些工具。
请使用java包装器帮助简单的工作示例。
答案 0 :(得分:0)
此配置解决问题
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp wrapper.java.classpath.1=../lib/example.jar wrapper.java.classpath.2=../lib/wrapper.jar wrapper.java.library.path.1=../lib wrapper.java.library.path.2=../lib/lib wrapper.java.additional.auto_bits=TRUE wrapper.java.additional.1="Oracle" wrapper.app.parameter.1=