I'm doing a project (in Eclipse) with GlassFish and it throws this error:
GlassFish requires Java SE version 6. Your JDK is version 0.
I ran the glassfish4/bin/asadmin start-domain command in a terminal but still get the same error.
Here is my JDK version:
I also try add AS_JAVA path in asenv.conf but it also didn't work . My Java path is "C:\Program Files\Java\jdk-21"
I hope anyone can fix it as it related to "JMS and DDS architectures " Pratical Homework
Glassfish 4.1.1 requires Java 7 or Java 8. From its
README.txt:The version 4.1.1 was released in 2015, replaced by 4.1.2 start of 2017.
The Version-String Scheme was changed with Java 9, released second half of 2017 - Key Changes in JDK 9 and JEP 223: New Version-String Scheme.
So I believe that the version 4.1.1 of Glassfish cannot deal with the new Version-String and so the version of Java 21 is not being recognized correctly as indicated by the error message "Your JDK is version 0".