views:

647

answers:

1

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.

A: 

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.

Kevin Wong