简体   繁体   中英

Java Service Wrapper 3.2.3 on Mac OS X 64-bit

What's the best way to run an app using Java Service Wrapper 3.2.3 on Mac OS X 64-bit?

sh.script.in works, but there is no macosx-universal-64 version of the wrapper native binary (on JSW's 3.2.3 downloads page anyway http://wrapper.tanukisoftware.org/downloads/3.2.3/ ).

The result is the following error in the logs:

INFO   | jvm 1    | 2009/08/20 14:47:15 | WARNING - Unable to load the Wrapper's native library because none of the
INFO   | jvm 1    | 2009/08/20 14:47:15 |           following files:
INFO   | jvm 1    | 2009/08/20 14:47:15 |             libwrapper-macosx-x86-64.jnilib
INFO   | jvm 1    | 2009/08/20 14:47:15 |             libwrapper-macosx-universal-64.jnilib
INFO   | jvm 1    | 2009/08/20 14:47:15 |             libwrapper.jnilib
INFO   | jvm 1    | 2009/08/20 14:47:15 |           could be located on the following java.library.path:
INFO   | jvm 1    | 2009/08/20 14:47:15 |             /Applications/EngineManager/.
INFO   | jvm 1    | 2009/08/20 14:47:15 |           Please see the documentation for the wrapper.java.library.path
INFO   | jvm 1    | 2009/08/20 14:47:15 |           configuration property.
INFO   | jvm 1    | 2009/08/20 14:47:15 |           System signals will not be handled correctly.

Also, when I try to restart the system, I get an error like:

Logout has timed out because the application ...WrapperSimpleApp failed to quit. ...`

I can't upgrade to a newer version of JSW because they went GPL.

I downloaded the Wrapper 3.2.3 source and compiled a macosx x86 64-bit version, which got rid of the native library warning.

I then noticed that I could restart the system from the command line with a sudo , and figured that the user-issued restart ("Apple Menu"/Restart) did not have permission to stop the service. I thought perhaps the user-issued restart was trying to stop the service because it was using a java.awt.SystemTray tray icon. I changed the service to run headless and voila, user-issued restart then executed without error.

Please make sure that you include the native library with the name libwrapper.jnilib in the libs folder of your project. for example {App_Dir}/libs/libwrapper.jnilib then link it in the wrapper.conf like this

wrapper.java.library.path.1=../lib

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM