HowTo: How to install on macOS

There are a number of options available to install the Java Service Wrapper on macOS systems.

All download files are available on the download page.

NOTE

This page describes the how to download and extract the Wrapper files on your system. Once extracted, please proceed to the Integration page for instructions to integrate the Java Service Wrapper with your application.

Install from a package

Compatibility :3.5.44
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :Windows (Not Supported)Mac OSXLinux (Not Supported)IBM AIX (Not Supported)FreeBSD (Not Supported)HP-UX (Not Supported)Solaris (Not Supported)IBM z/OS (Not Supported)IBM z/Linux (Not Supported)

Please download the pkg installer for the latest release.

Run the installer, clicking through each step to complete the installation. The Wrapper will be installed at /usr/local/Cellar/wrapper/<Wrapper version>. The most recently installed version can be accessed at /usr/local/opt/wrapper.

The Wrapper binaries and all installed files have been signed and notarized.

Once installed, please proceed to the Integration page for instructions to integrate the Java Service Wrapper with your application.

If, after integration, you have copied the binary files into your application, then the Wrapper installation is no longer needed. The Wrapper can be uninstalled using the following command.

Uninstall the Wrapper from the Terminal:
sudo /usr/local/Cellar/wrapper/3.5.44-pro/uninstall.sh 
Welcome to Java Service Wrapper Uninstaller
The following packages will be REMOVED:
  Java Service Wrapper (macosx-universal-64-3.5.44-pro)
Do you wish to continue [Y/n]?Y
[2/3] [DONE] Successfully unregistered Java Service Wrapper package
[3/3] [DONE] Successfully deleted Java Service Wrapper
Removed empty /usr/local/Cellar/wrapper
Java Service Wrapper uninstall process finished

Install from a package using the Terminal

Compatibility :3.5.44
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :Windows (Not Supported)Mac OSXLinux (Not Supported)IBM AIX (Not Supported)FreeBSD (Not Supported)HP-UX (Not Supported)Solaris (Not Supported)IBM z/OS (Not Supported)IBM z/Linux (Not Supported)

The ability to install a package from the Terminal or remotely via SSH can be very useful.

Please download the pkg installer for the latest release and transfer it to the machine onto which you wish to install the Wrapper.

The Wrapper can be installed using the following command:

Installation from the Terminal:
sudo installer -pkg wrapper-macosx-universal-64-3.5.44-pro.pkg -target /  
installer: Package name is Java Service Wrapper 3.5.44-pro
installer: Installing at base path /
installer: The install was successful.
Storing installation and detailed log into a file:
sudo installer -pkg wrapper-macosx-universal-64-3.5.44-pro.pkg -dumplog -target / 2>&1 > wrapper-installer.log

The Wrapper will be installed at /usr/local/Cellar/wrapper/<Wrapper version>. The most recently installed version can be accessed at /usr/local/opt/wrapper.

The Wrapper binaries and all installed files have been signed and notarized.

Once installed, please proceed to the Integration page for instructions to integrate the Java Service Wrapper with your application.

If, after integration, you have copied the binary files into your application, then the Wrapper installation is no longer needed. The Wrapper can be uninstalled using the following command.

Uninstall the Wrapper from the Terminal:
sudo /usr/local/Cellar/wrapper/3.5.44-pro/uninstall.sh 
Welcome to Java Service Wrapper Uninstaller
The following packages will be REMOVED:
  Java Service Wrapper (macosx-universal-64-3.5.44-pro)
Do you wish to continue [Y/n]?Y
[2/3] [DONE] Successfully unregistered Java Service Wrapper package
[3/3] [DONE] Successfully deleted Java Service Wrapper
Removed empty /usr/local/Cellar/wrapper
Java Service Wrapper uninstall process finished

Install from a tar.gz file

Compatibility :3.0.3
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :Windows (Not Supported)Mac OSXLinux (Not Supported)IBM AIX (Not Supported)FreeBSD (Not Supported)HP-UX (Not Supported)Solaris (Not Supported)IBM z/OS (Not Supported)IBM z/Linux (Not Supported)

The Wrapper binaries are signed starting with version 3.5.44. The downloaded tar.gz files will still be marked as having been downloaded from the internet, and thus quarantined. This can cause warnings later on if used as is. Installing from a package as above will not have this problem.

Verify that the downloaded files are marked as at risk:
ls -al
-rw-r--r--@  1 you   staff   999999 Oct 29 12:12 wrapper-macosx-universal-64-3.5.44-pro.tar.gz
See the details of the quarantine mark and show where the files came from:
xattr -l *

If you extract these tar.gz files as is, then all of the extracted files will also have these same quarantine marks. You then have the choice to either remove the quarantine marks from the archive before extracting it (recommended), or to recursively remove all quarantine marks from the extracted files.


Remove quarantine marks from the archive:
xattr -d com.apple.macl wrapper-macosx-universal-64-3.5.44-pro.tar.gz
xattr -d com.apple.metadata:kMDItemWhereFroms wrapper-macosx-universal-64-3.5.44-pro.tar.gz
xattr -d com.apple.quarantine wrapper-macosx-universal-64-3.5.44-pro.tar.gz

You can now safely extract the tar.gz file and extracted files will also be free of any quarantine marks.


Recursively remove all quarantine marks from files:
find wrapper* -print0 | xargs -0 xattr -d com.apple.macl
find wrapper* -print0 | xargs -0 xattr -d com.apple.metadata:kMDItemWhereFroms
find wrapper* -print0 | xargs -0 xattr -d com.apple.quarantine

WARNING

If you plan to install the Wrapper as a Unix daemon, it is important to extract the archive outside of your 'Downloads' directory. Spotlight's indexing will indeed prevent any service installed in that location from starting.

When blocked by Spotlight, the Wrapper won't be able to log any messages. You may just find an error such as 'Service exited due to SIGKILL | sent by mds[...]' in the syslog.

Once extracted, please proceed to the Integration page for instructions to integrate the Java Service Wrapper with your application.

The Wrapper can be uninstalled by simply deleting the above extracted Folder. If, after integration, you have copied the binary files into your application, then the Wrapper installation is no longer needed.

Install from a Delta Pack tar.gz file

Compatibility :3.2.0
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :Windows (Not Supported)Mac OSXLinux (Not Supported)IBM AIX (Not Supported)FreeBSD (Not Supported)HP-UX (Not Supported)Solaris (Not Supported)IBM z/OS (Not Supported)IBM z/Linux (Not Supported)

The Wrapper binaries are signed starting with version 3.5.44. The downloaded Delta Pack tar.gz files will still be marked as having been downloaded from the internet, and thus quarantined. This can cause warnings later on if used as is. Follow the steps above to remove these quarantine marks.

Once extracted, please proceed to the Integration page for instructions to integrate the Java Service Wrapper with your application.

For details on what the Delta Pack is, see the Delta Pack Overview.

If, after integration, you have copied the binary files into your application, then the folder where the files were extracted is no longer needed and can be removed.