title: Cannot instantiate class: com.sun.enterprise.naming.SerialInitContextFactory
body: <p>I have created a simple Enterprise Application in Netbeans, which works as expected inside Netbeans.  The Enterprise Application Client contains the following code:</p>
  
  <pre><code>package clienttest2;
  
  import java.util.Properties;
  import javax.naming.Context;
  import javax.naming.InitialContext;
  import javax.naming.NamingException;
  import test.TestEJBRemote;
  
  /**
   *
   * @author 
   */
  public class Main {
  private TestEJBRemote testejb;
  
      /**
       * @param args the command line arguments
       */
      public static void main(String[] args) throws NamingException {
          Properties props = new Properties();  
          props = new Properties();
          props.setProperty("java.naming.factory.initial",
              "com.sun.enterprise.naming.SerialInitContextFactory");
          props.setProperty("java.naming.factory.url.pkgs",
              "com.sun.enterprise.naming");
          props.setProperty("java.naming.factory.state",
              "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
          props.setProperty("org.omg.CORBA.ORBInitialHost", "computer");
          props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
          InitialContext ctx = new InitialContext(props);
          TestEJBRemote t = (TestEJBRemote) ctx.lookup("java:global/EJBTest/EJBTest-ejb/TestEJB");
          System.out.println(t.getName("Ian"));
  
          //Context ctx = null;
          //ctx=new InitialContext();
          //TestEJBRemote t = (TestEJBRemote) ctx.lookup("java:global/EJBTest/EJBTest-ejb/TestEJB");
          //System.out.println(t.getName("Ian"));
      }
  
  }
  </code></pre>
  
  <p>I have tried the following:</p>
  
  <pre><code>java -jar ClientTest.jar
  </code></pre>
  
  <p>The error I get is: Cannot instantiate class: com.sun.enterprise.naming.SerialInitContextFactory</p>
  
  <p>I have a few questions:</p>
  
  <p>I have  JRE 1.8 installed on my PC.  Does this mean that I can run all types of Java apps i.e. Java EE and Java SE?</p>