I think $PATH only affects you shell, not gnome/kde apps which may use other paths, so if it works with full path, why not use it?
one quick fix could be that you make link to /usr/bin
Code:
ln -s /opt/netbeans-5.0/bin/FILE /usr/bin/
just replace FILE with binary name