When I use Samuel's fix, some C++ code completion doesn't work as expected. In several classes I've tried writing, code completion isn't picking up stuff declared in the header file. When I use a copy of Oracle Java downloaded just for NB (i.e., netbeans_jdkhome="/home/<me>/opt/oracle-java/jre1.8" in /home/<me>/opt/netbeans/etc/netbeans.conf), things work as expected.
Note that I am using NB from upstream--so mileage may vary with the Debian package.
Whether this is a new or related bug I can't say, but I thought it worth mentioning in case anyone else is having the same problem.