Hello,
Im trying to use javamail to send emails to a authentication server. I have the authentication code written. I had to use an anonymous class for the authentication.
Problem is when I compile the program it is creating two classes,(one for the anonymous class).
Ive created my jar file to include the anonymous class. Im having problems with the 400 finding my class(jar file). How can I either, compile the java into a single class, or create my jar file accordingly.
Im trying to use javamail to send emails to a authentication server. I have the authentication code written. I had to use an anonymous class for the authentication.
Problem is when I compile the program it is creating two classes,(one for the anonymous class).
Ive created my jar file to include the anonymous class. Im having problems with the 400 finding my class(jar file). How can I either, compile the java into a single class, or create my jar file accordingly.
Code:
Properties systemProperty = System.getProperties(); systemProperty.put("mail.smtp.host", smtpHost); systemProperty.put("mail.smtp.port", smtpPort); systemProperty.put("mail.smtp.auth", smtpAuth); Session session = Session.getInstance(systemProperty, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication (userName, passWord); } });
Comment