How do I specify the JDK for a GlassFish domain?

前端 未结 9 2068
一生所求
一生所求 2020-11-28 08:02

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

相关标签:
9条回答
  • 2020-11-28 08:42

    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
    
    0 讨论(0)
  • 2020-11-28 08:46

    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.

    1. My GlssFish configuration file

      /Applications/NetBeans/glassfish-3.1.2.2/glassfish/config/asenv.conf

    2. Path to JDK 1.6

      /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

    3. I added the following line to the bottom of my asenv.conf file

      AS_JAVA=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

    0 讨论(0)
  • 2020-11-28 08:48

    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

    • /Users/username/GlassFish_Server/glassfish/domains/domain2/config
    • open the default_web.xml file
    • find the jsp
    • add

    0 讨论(0)
提交回复
热议问题