GlassFish Starting Up Java SE Client - No Initial Context Exception
- by Marcel
Hi
I have developed a java se client that calls some session beans on a glassfish server. I connect to the bean remote interface like this.
context = new InitialContext();
em = (ICrudService) context.lookup("java:global/BackITServer/CrudServiceImpl");
This works fine from inside eclipse (gf-client on build path). When I export my project as a runnable jar and call it on the console with
java -jar BackItClient.jar
I get a NoInitialContextException. MMMM. I would very much appreciate some help.
Thank You
Greetings Marcel
PS: Do I really have to pack all the jars which gf-client is referencing into my jar?