2 Replies Latest reply: Dec 6, 2012 3:32 AM by 859967 RSS

    run appclient

    859967
      Hi,

      I am trying to run a simpple javaee app client (only printing Helloworld) using command line tool, but i always have class not found exception:
       testme.jar
      java.lang.ClassNotFoundException: testme.jar
              at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:264)
              at org.glassfish.appclient.client.AppClientFacade.createContainerForClas
      sName(AppClientFacade.java:518)
              at org.glassfish.appclient.client.AppClientFacade.createContainer(AppCli
      entFacade.java:470)
              at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFa
      cade.java:269)
              at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.prem
      ain(AppClientContainerAgent.java:82)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:601)
              at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Instrumenta
      tionImpl.java:382)
              at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Instrument
      ationImpl.java:397)
      It is sort of classpath missing, but what went wrong with the default setting of glassfish after installation?

      ah yeah, the command line to run is:
      appclient testme.jar
      thanks,

      Edited by: CardM on Dec 5, 2012 11:53 PM
        • 1. Re: run appclient
          gimbal2
          appclient, whatever that is, seems to expect a fully qualified classname, not a jar. A jar you generally invoke through java -jar jarname.jar.

          Perhaps you should read whatever documentation of whatever product you're using to know the exact parameters. When you have a real programming related question, feel free to ask it.
          • 2. Re: run appclient
            859967
            sorry,, i google around and mis-copied the statement. It works now after a while.

            thanks,