Apache Netbeans 11 was released in early April 2019. For macOS, however, no installer is currently available. It is only possible to load a zip archive and then unpack it on the hard disk. The zip archive contains a script to start the IDE. However, that is not very comfortable. Ideally, you can find and start the IDE as an application under macOS. As an application there is also the possibility to start the IDE via the Dock. Below I want to show how NetBeans can be installed and configured as an application under macOS.
- Download the latest NetBeans release from https://netbeans.apache.org/download/nb110/nb110.html
- Extract the contents of the Zip-File to the Applications folder
- Download or clone the contents of the github project Run-script-as-an-Application: https://github.com/thedzy/Run-script-as-an-Applicaiton
- Copy the file Script-sh to /Applications/netbeans/bin folder
- Rename the file Script-sh in /Applications/netbeans/bin folder to netbeans
- Open the Info-Dialog of the previously renamed file netbeans in macOS Finder and Drag&Drop the Icon from /Applications/netbeans/nb/netbeans.png as new icon.
- Right-Click on the file /Applications/netbeans/bin/netbeans and select the function „Show Package Contents“.
- Navigate to /Contents/MacOS and open the file main.command with a text editor.
- Add the following line:1234...echo $BASEPATH$BASEPATH/netbeans...
- Voilà you are finished. Now you can start NetBeans by double clicking on the icon or by placing the icon for the application into the Dock.
This procedure can be applied to any type of script or any other application not providing a native installer for macOS.