I am trying to run a javamail program but am getting errors that I think
are related to the class path
I was originally getting errors from calling the program from RPG
Message . . . . : Java exception received when calling Java method (C
G D
F).

Cause . . . . . : RPG procedure MAILER in program MILIB/MAILER
received Java
exception "java.lang.NoClassDefFoundError: demo/Mailer" when calling
method
"sendSimpleMail" with signature


"(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;Ljava.lang.Strin
g;)L
java.lang.String;" in class "demo.Mailer".


When I run
java -showversion -classpath /Java/demo/ Mailer

java version "1.4.2"

java.lang.NoClassDefFoundError

at java.lang.Throwable.<init>(Throwable.java:180)

at java.lang.LinkageError.<init>(LinkageError.java:26)

at
java.lang.NoClassDefFoundError.<init>(NoClassDefFoundError.java:30)

at java.lang.ClassLoader.defineClass(ClassLoader.java:567)

at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:168)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:313)

at java.net.URLClassLoader.access$300(URLClassLoader.java:86)

at
java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:636)

at java.net.URLClassLoader.findClass(URLClassLoader.java:222)

at java.lang.ClassLoader.loadClass(ClassLoader.java:317)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)

at java.lang.ClassLoader.loadClass(ClassLoader.java:263)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:330)


My Classpath is :
echo $CLASSPATH

.:/java/javamail/mail.jar:/java/jaf/activation.jar:QIBMProdDataJava400ex
t:QIBMProdDataJava400jdk14libext*.jar

Any ideas what the path should be or If I need to be looking at
something else would be appreciated
Here are my import Statements:
import java.io.InputStream;

import java.util.Date;
import java.util.Properties;

import javax.activation.DataHandler;
import javax.activation.DataSource;

import javax.mail.Authenticator;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;

Thank You

Mike

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.