Netbeans illegal instruction Ubuntu

If you keep getting ‘illegal instruction’ whilst trying to run simple working code in using NetBeans and Ubuntu. It Can help if you disable profiling on your project. simply project -> properties -> profiling .. disable all.

Might help, Pete