[rabbitmq-discuss] re java client error

Paul Jones pauljones23 at gmail.com
Tue Sep 8 06:52:03 BST 2009


Aniruddh,

Ok. So the wrong name message means that you compiled the HelloServer
example slightly wrong. Perhaps the quickest thing to do would be to change
the source file, and remove the package declaration at the top. Then, if you
recompile, java HelloServer should work just fine.

Have you considered my suggestion about an IDE? Given the trouble it takes
just to get single class files to work, I'm sure you can see how troublesome
it could be to try to get something more complicated to work. An IDE also
gives you the ability to debug the code, and step through it as it does its
thing.

Also, would you be able to reply to emails instead of starting new threads?
In threaded mail readers (such as gmail), this conversation keeps coming in
as new mail conversations.

Thanks,
Paul.

On Tue, Sep 8, 2009 at 6:26 AM, aniruddh narayan <
aniruddh.narayan at yahoo.co.in> wrote:

> Hi paul..the previous was a typo error....anyway included the (.) current
> directory to the classpath.....but in vain....following is the output
>
> C:\>javac HelloServer.java
>
> C:\>java HelloServer
> Exception in thread "main" java.lang.NoClassDefFoundError: HelloServer
> (wrong na
> me: com/rabbitmq/examples/HelloServer)
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>         at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
> 4)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>
> C:\>java com.rabbitmq.examples.HelloServer
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/rabbitmq/examples
> /HelloServer
>
> Ani
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------
> Love Cricket? Check out live scores, photos, video highlights and more. Click
> here <http://in.rd.yahoo.com/tagline_cricket_2/*http://cricket.yahoo.com>.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090908/f07437b1/attachment.htm 


More information about the rabbitmq-discuss mailing list