Install NetBeans

Download
https://dlcdn.apache.org/netbeans/netbeans/22/netbeans-22-bin.zip

Snap package

snap install netbeans --classic

Install from homepage

#!/bin/bash

URL=https://www-us.apache.org/dist/incubator/netbeans/incubating-netbeans/incubating-10.0/incubating-netbeans-10.0-bin.zip

# install required applications
sudo apt -y install wget unzip

# download netbeans package
wget ${URL} -O /tmp/incubating-netbeans-bin.zip

# unip netbeans
sudo unzip -d /opt /tmp/incubating-netbeans-bin.zip

# create netbeans starter
cat < /tmp/netbeans.desktop
[Desktop Entry]
Encoding=UTF-8
Name=NetBeans IDE
Exec=/opt/netbeans/bin/netbeans
Icon=/opt/netbeans/nb/netbeans.png
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
EOF

sudo mv /tmp/netbeans.desktop /usr/share/applications/netbeans.desktop
sudo chmod +r /usr/share/applications/netbeans.desktop

# install Java JDK
wget -q https://raw.githubusercontent.com/panticz/installit/master/install.java-jdk.sh -O - | bash -
>

# configure jdk
# echo netbeans_default_options="netbeans_default_options="--jdkhome" | sudo tee -a /opt/netbeans/etc/netbeans.conf
# Cannot find java. Please use the --jdkhome switch

Add git repository
https://www.youtube.com/watch?v=mzzAUEFS4vs
https://netbeans.org/kb/docs/ide/github_nb_screencast.html

OPTIONAL: install MySQL driver

sudo apt-get install libmysql-java

DEP: fix ubuntu locale settings for german

sed -i 's|en_US.UTF-8|de_DE.UTF-8|g' /etc/scim/global

DEP: disable compiz effects (Visual Effects (System > Preferences > Appearance > Visual Effects => none)

metacity --replace &

Fix bold fonts under Linux

sudo apt-get remove -y fonts-unfonts-core

Ansible role

git clone https://github.com/panticz/ansible.git /tmp/ansible
cd /tmp/ansible/
export ANSIBLE_ROLES_PATH=$(pwd)/roles
ansible-playbook -K /dev/stdin <<END
- hosts: localhost
  become: yes
  roles:
    - netbeans
END

https://github.com/panticz/ansible/tree/master/roles/netbeans

Links
http://www.techytalk.info/netbeans-cannot-find-java-please-use-jdkhome-switch/ - HowTo (re)configure JAVA JDK
http://wiki.netbeans.org/NBPackagingPlan