I\'ve got GlassFish 2.1.1 installed. I have a 1.5 and a 1.6 JDK installed. Even though my JAVA_HOME variable is set to the 1.5 version (and both \"java -version\" and \"java
Here you can find how to set path to JDK for Glassfish: http://www.devdaily.com/blog/post/java/fixing-glassfish-jdk-path-problem-solved
Check
glassfish\config\asenv.bat
where java path is configured
REM set AS_JAVA=C:\Program Files\Java\jdk1.6.0_04\jre/..
set AS_JAVA=C:\Program Files\Java\jdk1.5.0_16
I'm working on a Mac, OSX 10.9. I recently had to update my JDK to 1.7 for some VPN software. The application I'm working runs on JDK 1.6, so a GlassFish had to run with JDK 1.6. It took a minute to iron this out, but here's how it went for me. I work with the NetBeans IDE by the way.
My GlssFish configuration file
/Applications/NetBeans/glassfish-3.1.2.2/glassfish/config/asenv.conf
Path to JDK 1.6
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
I added the following line to the bottom of my asenv.conf
file
AS_JAVA=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
ERROR MESSAGE :
..... PWC6199: Generated servlet error: -Source 1.5 does not support the diamond operator (please use -source version 7 or higher to enable the diamond operator)
Solution
On MAC : go to
add