Similar to bug 196075 -- where choosing well known windows specific directories was requested for userdir and cachedir -- it would be nice to have the same for Linux distributions or other Unix systems with a desktop environment like GNOME, LXDE, KDE or XFCE.
The XDG Base Directory Specification at http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html is a standard that is followed by these DE's and defines directory locations suitable for containing netbeans' userdir and cachedir.
The solution for bug 196075 already included setting cachedir to $HOME/.cache/netbeans by default (like Ubuntu: bug 196075, comment 17) although no standard seemed to be known (bug 196075, comment 17).
XDG Base Directory Specification already defines a "directory relative to which user-specific non-essential (cached) data should be written". In short: under whatever is specified by $XDG_CACHE_HOME, or under $HOME/.cache, if that environment variable is not set. Netbeans seems to conform to the latter part.
This request is for netbeans
1. to follow the specified behavior completely and first try $XDG_CACHE_HOME if set, and $HOME/.cache otherwise for cached data.
2. to store its user specific configuration under $XDG_CONFIG_HOME or $HOME/.config respectively
3. to store other user specific data (not projects) under $XDG_DATA_HOME or $HOME/.local/share respectively. This could be the biggest part so could be thrown together with 2. or stay where it is currently
For plugins there is currently nothing in XDG Base Directory Specification -- a discussion on their mailing list from December 2011 (here: http://lists.freedesktop.org/archives/xdg/2011-December/012206.html) mainly discusses "dlopened plugins not libraries". This seems to indicate that plugins don't fit into 3. but no alternative is specified yet.