If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > jar in jar classes not found: run jar

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-29-10, 14:30
lse123 lse123 is offline
Registered User
 
Join Date: May 2007
Posts: 139
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
Reply With Quote
  #2 (permalink)  
Old 05-29-10, 14:43
shammat shammat is offline
Registered User
 
Join Date: Nov 2003
Posts: 2,407
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On