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:
- Find this configuration file:
C:\servers\glassfish\config\asenv.bat
(this path is an example) 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
Extract Integer Part in String
Mockito: Mock Private Field Initialization
How to Convert Words to a Number
Any Simple Way to Explain Why I Cannot Do List<Animal> Animals = New Arraylist<Dog>()
Is There a Sophisticated File System Monitor for Java Which Is Freeware or Open Source
What Is the Time Complexity Performance of Hashset.Contains() in Java
Detect If Java Application Was Run as a Windows Admin
How to Find a Definitive Selenium Webdriver to Firefox Compatibility Matrix
Why Should I Override Hashcode() When I Override Equals() Method
Are Two Java Objects with Same Hashcodes Not Necessarily Equal
Alternative to Deprecated Getcelltype
Can Someone Please Explain Me @Mapsid in Hibernate
Difference Between "This" And"Super" Keywords in Java
Unsatisfiedlinkerror: No Opencv_Java249 in Java.Library.Path