This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The JavaHelp for the server properties reads: "Java. The Java tab enables you to specify the following options: Java Executable. Enables you to specify the Java Platform the server will use. If no Java executable is specified, the server will use the same Java Platform as is used by the IDE." In my server properties, the Java Executable is blank. I have 2 JDKs: 1.7 and 1.6 (which I installed before 1.7) I don't know why, but GlassFish is using JDK 1.6 even if I start it from the command line. The IDE uses JDK 1.7 I don't know what the supported method is to change the JDK for GlassFish. I found two files: C:\Program Files\glassfish-3.1.2.2\glassfish\config\asenv.conf C:\Program Files\glassfish-3.1.2.2\glassfish\config\asenv.bat Both contain the same comment: "Yet, this file is also where users of earlier versions have sometimes added a definition of AS_JAVA to control which version of Java GlassFish should use." So I added in asenv.bat: set AS_JAVA=C:\Program Files\Java\jdk1.7.0_07 I felt a bit unsure to set the "Java Executable" in the server properties, because I thought that it is not the executable e.g. somepath\java.exe that I would want to set but the java platform directory. So I did not do it.
This was based on an invalid assumption. Sorry.