Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating jar file with manifest and audio and image folders including external jars
    primarykey
    data
    text
    <p>I am trying to create a jar file having following project contents</p> <ul> <li>Project <ul> <li>user_interface (package folder including all .classes related to GUI)</li> <li>function_operations (package folder including all .classes related to operations)</li> <li>sounds (folder include all sound files)</li> <li>icons (include all images and icons)</li> <li>jars (include all external jar files)</li> <li>manifest.txt (having one line *Main-Class: user_interface.messengerGUI* and two enters)</li> </ul></li> </ul> <p>i m using command </p> <pre><code>jar cvfm helloBuddy.jar manifest.txt user_interface/*.class function_operations/*.class icons/ sounds/ </code></pre> <p>It successfully create jar file but gives following error while executing</p> <blockquote> <p>JAI-MATA-DI-LINUX Project # java -jar helloBuddy.jar Exception in thread "main" java.lang.NoClassDefFoundError: user_interface/messengerGUI Caused by: java.lang.ClassNotFoundException: user_interface.messengerGUI 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:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: user_interface.messengerGUI. Program will exit.</p> </blockquote> <p>another problem is how to include external jars?</p> <p>Edited: finaly some success to jar formation. Using eclipse i am able to create jar file. But when i run it gives the following error</p> <blockquote> <p>Exception in thread "main" java.lang.NoClassDefFoundError: org/jivesoftware/smack/ChatManagerListener Caused by: java.lang.ClassNotFoundException: org.jivesoftware.smack.ChatManagerListener 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:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: user_interface.messengerGUI. Program will exit.</p> </blockquote> <p>I have included few external jar files in project. org/jivesoftware/smack/ChatManagerListener this class belongs to one of the smackx.jar file. so this error is of external jar files added to project. any clue how can i resolve this?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload