I think my jar to work needs mail.jar plus the others class files what to do?
subject:javax.mail.Message
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 and keep package structure?)
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.run(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