package javax.mail et javax.mail.internet n'existent pas

Quand je compile un code simple qui a les 2 déclarations d'importation:

import javax.mail.*

import javax.mail.internet.*

Je reçois le message suivant:

package javax.mail does not exist

package javax.mail.internet does not exist

Pourquoi j'ai cette erreur?

Voici le code que j'ai:

import javax.mail.*;
import javax.mail.internet.*;
import java.util.*;

class tester {
 public static void main(String args[]) {
   Properties props = new Properties();
   props.put("mail.smtp.com" , "smtp.gmail.com");
   Session session  = Session.getDefaultInstance( props , null);
   String to = "[email protected]";
   String from = "[email protected]";
   String subject = "Testing...";
   Message msg = new MimeMessage(session);
    try {
      msg.setFrom(new InternetAddress(from));
      msg.setRecipient(Message.RecipientType.TO , new InternetAddress(to));
      msg.setSubject(subject);
      msg.setText("Working fine..!");
    }  catch(Exception exc) {
       }
 }
}
InformationsquelleAutor saplingPro | 2011-07-07