OpenJDK to develop JavaEE?
Your Glassfish server is the concrete Java EE implementation. Note that OpenJDK is a concrete Java SE implementation. Also note that whenever you download Java EE from Oracle site, basically all you get is Glassfish along with a bunch of documents and examples.
See also:
- What exactly is Java EE?
It is fact that J2EE does not specify a JVM, and that Glassfish4 and 5 both check for the Oracle JVM, and do not run with any other JVM.
Note that OpenJDK simply does not work with Glassfish. Glassfish is looking for OracleJDK specifically.
This is what happens if you try to start glassfish on MacOS with OpenJDK 12.0:
bin/asadmin start-domain
Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)