Results 1 to 2 of 2
  1. #1
    Join Date
    May 2007
    Posts
    139

    Unanswered: jar in jar classes not found: run jar

    subject:javax.mail.Message jar in jar classes not found: run jar
    I used
    jar cmf SMTPClient.mf SMTPClient.jar SMTPClient.class SMTPClient$SendAction.class SMTPClient$UpdateListener.class mail.jar SMTPClient.java

    but gives (how include another jar in my jar?)
    Code:
      C:\Users\User\Documents\TextBooksDataFiles\Java Network Programming, 3rd Edition\jnp3examples\examples\19>jar cmf SMTPClient.mf SMTPClient.jar SMTPClient.class SMTPClient
    $SendAction.class SMTPClient$UpdateListener.class mail.jar SMTPClient.java
    
    C:\Users\User\Documents\TextBooksDataFiles\Java Network Programming, 3rd Edition\jnp3examples\examples\19>java -jar SMTPClient.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Message
            at SMTPClient.<init>(SMTPClient.java:115)
            at SMTPClient.main(SMTPClient.java:296)
    Caused by: java.lang.ClassNotFoundException: javax.mail.Message
            at java.net.URLClassLoader$1****n(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
            ... 2 more

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by lse123 View Post
    jar cmf SMTPClient.mf SMTPClient.jar SMTPClient.class SMTPClient$SendAction.class SMTPClient$UpdateListener.class mail.jar SMTPClient.java
    You cannot pack a jar into another jar.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •