title: How to make jar file created by netbeans work from any location in the system
body: <p>I have a java desktop application in <code>netbeans</code>. I have created an executable jar file for the project using clean and build command provided by the <code>netbeans</code>. By using this command the executable jar file gets created under netbeansProjects//dist/.jar. I am able to execute this jar file from command line using java -jar .jar from within project path. But the problem is that when i move this jar outside of netbeans projects folder, say to desktop and run the jar file, it is giving error of type "Exception in thread "main" <code>java.lang.NoClassDefFoundError</code>". How to solve this problem and make the jar file executable from any location of the system.</p>