Aniruddh,<br><br>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.<br>
<br>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.<br>
<br>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.<br><br>Thanks,<br>Paul.<br><br><div class="gmail_quote">
On Tue, Sep 8, 2009 at 6:26 AM, aniruddh narayan <span dir="ltr"><<a href="mailto:aniruddh.narayan@yahoo.co.in">aniruddh.narayan@yahoo.co.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
Hi paul..the previous was a typo error....anyway included the (.) current directory to the classpath.....but in vain....following is the output<div><br></div><div><div><br></div><div>C:\>javac HelloServer.java</div><div>
<br></div><div>C:\>java HelloServer</div><div>Exception in thread "main" java.lang.NoClassDefFoundError: HelloServer (wrong na</div><div>me: com/rabbitmq/examples/HelloServer)</div><div> at java.lang.ClassLoader.defineClass1(Native Method)</div>
<div> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)</div><div> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12</div><div>4)</div><div> at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)</div>
<div>
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)</div><div> at java.net.URLClassLoader$1.run(URLClassLoader.java:195)</div><div> at java.security.AccessController.doPrivileged(Native Method)</div>
<div> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)</div><div> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)</div><div> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)</div>
<div> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)</div><div> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)</div><div><br></div><div>C:\>java com.rabbitmq.examples.HelloServer</div>
<div>Exception in thread "main" java.lang.NoClassDefFoundError:
com/rabbitmq/examples</div><div>/HelloServer</div><div><br></div><div>Ani</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>
<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></td></tr>
</tbody></table><br>
<hr size="1"> Love Cricket? Check out live scores, photos, video highlights and more. <a href="http://in.rd.yahoo.com/tagline_cricket_2/*http://cricket.yahoo.com" target="_blank"> Click here</a>.<br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div><br>