Hi to all,
I am new to JMS concept in java.I have downloaded a example jms program in the site. So i have mention the classpath the java path.The jms program is compiled fine and class file also gernerated.

The problem is when i run the normal java program or any other java program the following error is occured.


I am using the fedora redhat.

Error Message:
java ex_sample
Exception in thread "main" java.lang.NoClassDefFoundError: ex_sample
Caused by: java.lang.ClassNotFoundException: ex_sample
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)

This error is cleared when i remove the classpath variable .

1.Can any one say why this error is appearing ?
2.If i am not mentioned the classpath the JMS program is not executed?

Thank you,

With Regards,

Where is the ex_sample.class file when you execute the 'java ex_sample' command?
Can the java command "see" it? The default classpath is the current directory.