Client call to EJB error: javax.naming.NoInitialContextException
问题 Calling my EJB from class Main: MyService myService = (MyService) ctx.lookup(MyService.class.getName()); Gives error: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313) at javax.naming.InitialContext