title: call Remote EJB from client JAVA
body: <p>I have to implement two simples java projects ; the first is an EJB projectwho contains a simple service which implement a remote interface, and the second project is a java client which try to call this ejb project , 
  so here is what I did until now : </p>
  
  <pre><code>Context context = new InitialContext(jndiProperties);
      TestServiceRemote proxy = (TestServiceRemote) context
              .lookup("java:global/testEJB/TestService!services.TestServiceRemote");
      System.out.println(proxy.showHello());
  </code></pre>
  
  <p>and this my ejb service : </p>
  
  <pre><code>@Stateless
  public class TestService implements TestServiceRemote {
  
  public TestService() {
  
  }
  
  @Override
  public String showHello() {
      return "Hello";
  
  }
  
  }
  </code></pre>
  
  <p>finally this my Remote interface : </p>
  
  <pre><code>@Remote
  public interface TestServiceRemote {
     public String showHello();
  }
  </code></pre>
  
  <p>I had deployed the EJB in WIldfly 9 , but when I launch the java client i get this error shown in console : </p>
  
  <pre><code>Exception in thread "main" 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.getURLOrDefaultInitCtx(InitialContext.java:350)
  at javax.naming.InitialContext.lookup(InitialContext.java:417)
  at swing.testClient.main(testClient.java:22)
  </code></pre>
  
  <p>Can someone tell me what I had wrong in my code ?</p>