commenting in /etc/java-8-openjdk/accessibility.properties the next line seems to work:
#assistive_technologies=org.GNOME.Accessibility.AtkWrapper I figured it out cause I have a computer with netbeans working properly without any problem with that settings due to a time ago bug that preventing netbeans to start and another with a fresh debian installation, in the last one, netbeans closed sundenly when editing in php. Changing that in the new one seems to work and I have no unexpected close of netbeans.