How to Specify the Jdk for a Glassfish Domain

How do I specify the JDK for a GlassFish domain?

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

Run Glassfish on Java 7 with Java 8 installed on Windows box

Simply specify the needed JDK for your Glassfish domain:

  1. Find this configuration file: C:\servers\glassfish\config\asenv.bat (this path is an example)
  2. Edit the file, comment the previous JDK and add the wanted one:

    REM set AS_JAVA=C:\Program Files\Java\jdk1.8\.. 
    set AS_JAVA=C:\Program Files\Java\jdk1.7\..

Intellij 2019.2: GlassFish requires Java SE version 6. Your JDK is version 0

Inside of your Injellij double shift (press shift twice) to open the search and type in JDK. Under actions click on switch boot JDK and make sure you have one there if not select one and then click save and restart. hope this works and helps.

Glassfish Server 4.0 (now: 4.1.1) installation: can't find the JDK and won't accept a manual location

So, apparently all versions of Glassfish aren't compatible with the 9.0+ JDK as of August 2017.

I downgraded to v8 of the JDK.

The installation GUI alerted an error about not being able to find the JRE initially, and didn't even make it to setting the JDK location.

Running glassfish-4.0-windows.exe -j "C:\Program Files\Java\jdk1.8.0_151\jre" made Glassfish finally accept it and install successfully.



Related Topics



Leave a reply



Submit