The default jndi.properties is in glassfish.home/lib/appserv-rt.jar. So you just need to include appserv-rt.jar in your classpath (usually to the beginning of the client classpath to avoid being overridden). Of course, you will also need glassfish.home/lib/javaee.jar for compilation and runtime.