Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Where can download javax.activation ?

843830May 21 2003 — edited May 21 2003
Below program with following error. I want to know where can I download javax.activation ?

C:\example\javaux\mail>java exmail
Define Session - OK
java.lang.NoClassDefFoundError: javax/activation/DataSource

C:\example\javaux\mail>

/*
2003/05/21
*/

import java.util.*;
import java.net.*;
// Define java mail import file
import javax.mail.*;
import javax.mail.internet.*;
/*
import javax.activation.*;
import javax.activation.FileDataSource;
import javax.activation.DataHandler; */

public class exmail {
public static void main(String[] args){
String host = "x";
String from = "x";
String to = "x";

// Get System properties
Properties props = System.getProperties();

// Setup mail server
props.put("mail.smtp.host",host);

// Get Session
Session session = Session.getDefaultInstance(props,null);
System.out.println("Define Session - OK");

// Define message
try {
MimeMessage message = new MimeMessage(session);
System.out.println("Define Message - OK");
}
catch ( NoClassDefFoundError e ) {
System.err.println(e);
}

try {

}
catch (Exception e) {
System.out.println("error");
}
}

}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2003
Added on May 21 2003
2 comments
635 views