javaMail java·¢ËÍemail
·¢ËÍemailÓ¦Óã»
package mail;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
import sun.misc.BASE64Encoder;
public class Mail {
// ¶¨Òå·¢¼þÈËÏÔʾÃû³Æ¡¢·¢¼þÈË¡¢ÊÕ¼þÈË¡¢³ËÍ¡¢SMTP·þÎñÆ÷¡¢Óû§Ãû¡¢ÃÜÂë¡¢Ö÷Ìâ¡¢ÄÚÈݵÈ
private String displayName;
private String from;
private String to;
private String copyTo;
private String smtpServer;
private String username;
private String password;
private String subject;
private String content;
private boolean ifAuth; // ·þÎñÆ÷ÊÇ·ñÒªÉí·ÝÈÏÖ¤
private String filename = "";
private Vector file = new Vector(); // ÓÃÓÚ±£´æ·¢Ë͸½¼þµÄÎļþÃûµÄ¼¯ºÏ
/**
* ÉèÖÃSMTP·þÎñÆ÷µØÖ·
*/
public void setSmtpServer(String smtpServer) {
this.smtpServer = smtpServer;
}
/**
* ÉèÖ÷¢¼þÈ˵ĵØÖ·
*/
public void setfrom(String from) {
this.from = from;
}
/**
* ÉèÖÃÏÔʾµÄÃû³Æ
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
* ÉèÖ÷þÎñÆ÷ÊÇ·ñÐèÒªÉí·ÝÈÏÖ¤
*/
public void setIfAuth(boolean ifAuth) {
this.ifAuth = ifAuth;
}
/**
* ÉèÖÃE-mailÓû§Ãû
*/
public void setUserName(String username) {
this.username = username;
}
/**
* ÉèÖÃE-mailÃÜÂë
*/
public void setPassword(String password) {
this.password = password;
}
/**
* ÉèÖýÓÊÕÕß [;¸ô¿ª]
*/
public void setTo(String to) {
this.to = to;
}
/**
* ÉèÖÃÖ÷Ìâ
*/
public void setSubject(String subject) {
this.subject = subject;
}
/**
* ÉèÖÃÖ÷ÌåÄÚÈÝ
*/
public void setContent(String content) {
&nbs
Ïà¹ØÎĵµ£º
public class OuterClass
{
public class InnerClass
{
public int code = 100;
}
public static void main(String[] args)
{
OuterClass outer = new OuterClass();
OuterClass.InnerClass o = outer.new InnerClass();
System. ......
Ê×ÏȽéÉÜһϻ·¾³±äÁ¿µÄÉèÖ÷½·¨£º
£¨ÕâÀïÒÔjdk1.5À´°²×°£¬ÆäËû°æ±¾Ò»Ñù£©
ÔÚ°Ñjdk1.5°²×°µ½¼ÆËã»úÖÐÖ®ºó£¬ÎÒÃÇÀ´½øÐÐÉèÖÃʹjava»·¾³Äܹ»Ê¹Óá£
Ê×ÏÈÓÒ¼üµãÎҵĵçÄÔ¡£´ò¿ªÊôÐÔ¡£È»ºóÑ¡Ôñ“¸ß¼¶”ÀïÃæµÄ“»·¾³±äÁ¿”£¬ÔÚеĴò¿ª½çÃæÖеÄϵͳ±äÁ¿Ð ......
Ò».´úÂëÓÅ»¯
¡¡¡¡ÄÚ´æ»áÒç³ö¿Ï¶¨ºÍ´úÂëÌÓ²»Á˹Øϵ,99.99%ѧjavaµÄÈ˶¼ÖªµÀÀ¬»ø»ØÊÕÆ÷ÊÇ javaµÄÒ»´óÓŵ㲢¾Ý´ËÀ´³°Ð¦C++¡£ÏÔÈ»Õâ¸öÌØÐÔΪ´úÂë±àдÕßÊ¡Á˲»ÉÙÊ£¬µ«Õâ¸öÌØÐÔÈ´´øÀ´Á˲»ÉÙÒþ»¼¡£¾Ù¸öÀý×ÓÔÚÓÎÏ·µ±Öо³£Óв»Í¬³¡¾°µÄÇл»£¬Èç´ÓÓÎÏ·Âß¼Í˵½Ö÷²Ëµ¥Âß¼,¶ÔÓÎÏ·Âß¼¶ÔÏóµÄ̬¶ ......
ÕâÊÇÒ»¸öÓÃJAVA W3C DOM ½øÐÐXML²Ù×÷µÄÀý×Ó£¬°üº¬Á˲éѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ý¡¢±£´æµÄ»ù±¾²Ù×÷¡£½ÏÍêÕûµÄÃèÊöÁËÒ»¸öXMLµÄÕû¸ö²Ù×÷Á÷³Ì¡£ÊʺϸÕÈëÃÅJAVA XML²Ù×÷µÄÅóÓѲο¼ºÍѧϰ¡£
¼ÙÉèÓÐXMLÎļþ£ºtest1.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book>
<name>¹þÀï²¨Ì ......
1£©DOM£¨JAXP Crimson½âÎöÆ÷£©
DOMÊÇÓÃÓëƽ̨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐÑ°ÕÒÌض¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµºÍ¹¹Ôì²ã´Î½á¹¹£¬È»ºó²ÅÄÜ×öÈκι¤×÷¡£ÓÉÓÚËüÊÇ»ùÓÚÐÅÏ¢²ã´ÎµÄ£¬Òò¶øDO ......