This issue relates to the GlassFish Java SE client, as documented in
If my application creates an InitialContext and does a JNDI lookup of java:comp/InAppClientContainer then I get a value of false.
This is incorrect. There should only be a value bound at this location if the application is running in a Java EE container. However this is not a Java EE container. It's (obviously) not a web or EJB container, and the product documentation describes this as "without the ACC" and so this is not an application client container either. So by returning a value at this location GlassFish is returning misleading information, since clients cannot use it to find out which container they are running in.