On Windows 7 I downloaded the \'netbeans-8.0.1-javaee-windows.exe\' installer from this site https://netbeans.org/downloads/. The installer installs GlassFish 4.1, Java 1.8.
If you are using netbeans 7 and greater with oracle xe do the following on netbeans :
9090
Glassfish can use that one if available or some random port number is created