As I recall, it's just a matter of invoking asadmin to enter the asadmin shell:

thufir@dur:~$ 
thufir@dur:~$ glassfish-5.0/glassfish5/bin/asadmin 
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)
thufir@dur:~$ 
thufir@dur:~$ java -version
openjdk version "9.0.0.15"
OpenJDK Runtime Environment (Zulu build 9.0.0.15+181)
OpenJDK 64-Bit Server VM (Zulu build 9.0.0.15+181, mixed mode)
thufir@dur:~$ 
thufir@dur:~$ javac -version
javac 9.0.0.15
thufir@dur:~$ 
thufir@dur:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.10
DISTRIB_CODENAME=artful
DISTRIB_DESCRIPTION="Ubuntu 17.10"
thufir@dur:~$ 

I've also tried directly entering list-domains as well as a few other commands -- all crash.

closed as off-topic by glenn jackman, Fabby, Ravexina, Eric Carvalho, pa4080 Oct 26 '17 at 16:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – glenn jackman, Fabby, Ravexina, Eric Carvalho, pa4080
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 3 down vote accepted

GlassFish 5 doesn't support JDK 9 yet. Work on supporting JDK 9 is ongoing and will be part of the version 5.0.1 - see the notice at https://javaee.github.io/glassfish/download

Payara Server, an actively maintained fork of GlassFish, runs on JDK 9 since version 5 - Alpha 2. This is a pre-release and not yet fully tested but if you need JDK 9 support it's probably the only released server that does it until GlassFish 5.0.1 is out.

  • doh. I mean, I should've figured that out. Thanks. I wonder whether it's possible to "downgrade" the JVM but keep Java 9... – Thufir Oct 25 '17 at 12:10
  • 1
    With Java 9 you need JDK 9, they are coupled. I've just updated my answer to mention Payara Server which supports JDK 9 in the latest Alpha release. – OndrejM Oct 25 '17 at 12:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.