Java Netbeans: 'Package does not exist'
Clear the cache to fix it. In Windows, cache is located at:
C:\Users\username\AppData\Local\NetBeans\...
On Linux, cache is at:
/home/username/.cache/netbeans/...
After clearing the cache restart netbeans.