4 Replies Latest reply on Sep 12, 2002 2:58 AM by Andres Gonzalez

    Basic Problem: How to execute my .ear archive??

    Andres Gonzalez Newbie

      Hi felows. this is the problem. My ear archive has two jar files.

      -One jar file a session bean that interacts with an entity bean.

      - the other jar file is a dummy client that gets a reference to the session bean and test the application, very simple. it is only one class (MyClient.java)

      the problem is, I don't know how to execute MyClient, it is suppossed to be from the command prompt, but don't know how to do it...

      P. S. In order to this second jar file to be executable, I added this line in the manifest:

      Main-Class: example.cmp.client.MyClient

      any ideas?

      thanks

        • 1. Re: Basic Problem: How to execute my .ear archive??
          Andres Gonzalez Newbie

          I sort of solve my problem. My client is a single class, so I did not put it in the ear file. I put it in a separate jar file. But know when I try to execute this jar file I get this error:

          MESSAGE: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
          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:640)
          at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
          at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
          at javax.naming.InitialContext.lookup(InitialContext.java:347)
          at example.cmp.client.MyClient.main(Unknown Source)

          I've searched the forum and found a similar problem but haven't had any luck...

          any ideas?

          thanks

          • 2. Re: Basic Problem: How to execute my .ear archive??
            Andres Gonzalez Newbie

            I sort of solve my problem. My client is a single class, so I did not put it in the ear file. I put it in a separate jar file. But know when I try to execute this jar file I get this error:

            MESSAGE: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
            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:640)
            at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
            at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
            at javax.naming.InitialContext.lookup(InitialContext.java:347)
            at example.cmp.client.MyClient.main(Unknown Source)

            I've searched the forum and found a similar problem but haven't had any luck...

            any ideas?

            thanks

            • 3. Re: Basic Problem: How to execute my .ear archive??
              Andres Gonzalez Newbie

              I sort of solve my problem. My client is a single class, so I did not put it in the ear file. I put it in a separate jar file. But know when I try to execute this jar file I get this error:

              MESSAGE: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
              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:640)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
              at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
              at javax.naming.InitialContext.lookup(InitialContext.java:347)
              at example.cmp.client.MyClient.main(Unknown Source)

              I've searched the forum and found a similar problem but haven't had any luck...

              any ideas?

              thanks

              • 4. Re: Basic Problem: How to execute my .ear archive??
                Andres Gonzalez Newbie

                I sort of solve my problem. My client is a single class, so I did not put it in the ear file. I put it in a separate jar file. But know when I try to execute this jar file I get this error:

                MESSAGE: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
                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:640)
                at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
                at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
                at javax.naming.InitialContext.lookup(InitialContext.java:347)
                at example.cmp.client.MyClient.main(Unknown Source)

                I've searched the forum and found a similar problem but haven't had any luck...

                any ideas?

                thanks