title: How to deploy EJB 3.0 using Command Line?
body: <p>I am following <a href="https://www.javaworld.com/article/2071724/ejb-fundamentals-and-session-beans.html?page=3" rel="nofollow noreferrer">this</a> fundamentals of JEE tutorial which provides instruction to create a minimal EJB deployment. </p>
  
  <p>I have gone through the steps in the tutorials but made changes to the following command line invocations</p>
  
  <ul>
  <li>>set CLASSPATH=.;E:\wildfly-10.1.0\wildfly-10.1.0.Final\bin\client\jboss-client.jar; <strong>(Changed from the long list in the tutorial)</strong></li>
  <li>>jar -cvf SimpleSessionApp.ear beans*.java <strong>(Changed file extention to .ear from .ejb3)</strong></li>
  <li>copy SimpleSessionApp.ear E:\wildfly-10.1.0\wildfly-10.1.0.Final\standalone\deployments <strong>(Copied to the wildfly deployment directory)</strong></li>
  </ul>
  
  <p>I started the server and I did not get any errors. However, I did not get set of standard names the server log outputs when a bean is deployed.</p>
  
  <p>I ran the client application using the following command as in tutorial</p>
  
  <ul>
  <li>>java -D java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -D java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces -D java.naming.provider.url=localhost client.SimpleSessionClient Now is the time for all good men</li>
  </ul>
  
  <p>I get the following error as the output</p>
  
  <blockquote>
    <p>Error: Could not find or load main class java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory</p>
  </blockquote>
  
  <p>I know the tutorial caters for an older version of Java and JBoss. However, I modified the old references to point to the newer environment as mentioned above. So I assume versioning is not a issue here? BTW I'm just starting to learn EJB. Any insights would be great.</p>
  
  <p><strong>My Environment</strong></p>
  
  <ul>
  <li>Java 1.8.0.212</li>
  <li>Wildfly 10.1.0.Final</li>
  <li>Notepad</li>
  </ul>