The installer needs a full JDK installation to run.
If you get this error, you probably don't have the required JDK installed. NetBeans IDE requires the full Java Development Kit (JDK) to run - the Java Runtime Environment (JRE) is not sufficient.
You must install the full JDK before installing NetBeans, or install the JDK-NetBeans bundle available from java.sun.com. In case you have the full JDK installed, but the installer fails to recognize it, try to run with the -is:javahome option.
Source: NetBeans User FAQ