¹ØÓÚjava¿ª·¢Óʼþ½ÓÊÕ³ÌÐòµÄÒ»µã×ܽá
ÓÃjava¿ª·¢Óʼþ½ÓÊÕ³ÌÐòÐèÒªÓõ½javamail°ü£¬×ÊÔ´µØÖ·£ºhttp://java.sun.com/products/javamail/£¬×îаæÊÇ JavaMail 1.4.3 £¬ÏÂÔصØÖ·ÊÇ£ºhttp://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/javamail-1.4.3.zip?BundledLineItemUUID=gqFIBe.oRjUAAAEl1r4xay_N&OrderID=t1BIBe.o3q4AAAElxL4xay_N&ProductID=J3tIBe.pJGsAAAElR5Jh6wjK&FileName=/javamail-1.4.3.zip¡£
ÀïÃæÓÐÁ½¸ö¹Ø¼üµÄjar°ü£¬·Ö±ðÊÇmail.jarºÍactivation.jar£¬Ò»¶¨Òª·ÅÔÚjavaĿ¼\jre\lib\extĿ¼ÀïÃ棬·ñÔò»áÔÚ±àÒëʱ±¨´í£¬´íÎóÐÅÏ¢ÈçÏ£º
ReceiveMail.java:10: package javax.mail does not exist
import javax.mail.*;
^
ReceiveMail.java:11: package javax.mail.internet does not exist
import javax.mail.internet.*;
ÏÂÃæÌù³öÀ´Ò»¸öÀý×Ó´úÂ룬¹©²Î¿¼£¨µ±È»ÄãÒ²¿ÉÒÔÍøÉϲ鵽£©
// java ÊÕÓʼþ³ÌÐò
import java.io.*;
import java.text.*;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
/**
* ÓÐÒ»·âÓʼþ¾ÍÐèÒª½¨Á¢Ò»¸öReciveMail¶ÔÏó
*/
public class ReceiveMailDemo {
private MimeMessage mimeMessage = null;
private String saveAttachPath = ""; //¸½¼þÏÂÔغóµÄ´æ·ÅĿ¼
private StringBuffer bodytext = new StringBuffer();//´æ·ÅÓʼþÄÚÈÝ
private String dateformat = "yy-MM-dd HH:mm"; //ĬÈϵÄÈÕÇ°ÏÔʾ¸ñʽ
public ReceiveMailDemo(MimeMessage mimeMessage) {
this.mimeMessage = mimeMessage;
}
public void setMimeMessage(MimeMessage mimeMessage) {
this.mimeMessage = mimeMessage;
&n
Ïà¹ØÎĵµ£º
String str = "[010101]+[010102]";
String ss = "
System.out.println(ss); // \[010101]
[ ÊÇÌØÊâ×Ö·û£¬
ÐèÒªÓ÷´Ð±¸Ü \[ ¶ÔÆä½øÐÐתÒå
\\[010101]";
String ssss = "
\\ ......
ÎÒ¸Õ´ÓÔÚAntwerpÕÙ¿ªµÄDevoxx
´ó»áÉÏ»ØÀ´£¬»áÉϽéÉÜÁËJava7µÄÐÂÌØÐÔ£¬¶ÔÓ¦µÄJDK½«ÓÚ2010Äê9Ô·¢²¼¡£
ÏÂÃæÊÇ7¸öÒѾÍê³ÉµÄÐÂÌØÐÔ£º
¶ÔcollectionsµÄÓïÑÔ¼¶Ö§³Ö
×Ô¶¯×ÊÔ´¹ÜÀí
¸Ä½ø·ºÐÍÔÚ´´½¨ÊµÀýʱµÄÀàÐÍÒýÓÃ
´øÏ»®ÏßµÄÊý×Ö
ÔÚswitchÖÐʹÓÃString
¶þ½øÖÆÎÄ×Ö
¼ò»¯µÄ¿É±ä²ÎÊý·½·¨µ÷ÓÃ
Java7»¹ÓкܶàÆäËûµÄÐÂÌØÐÔ£¬Î ......
±¾ÌùÕª×Ô http://bbs.langsin.com/redirect.php?tid=9936&goto=lastpost
Ïë´òÓ¡Ò»¸öString ±äÁ¿µÄµØÖ·£¬ÇëÎÊÈçºÎÀ´Ð´£¿
²»ÊÇhashcode£¬¾ÍÊÇÄÚ´æµØÖ·£¬¶øÇÒÒª´òÓ¡³öÀ´¡£
Ò²Ðí±È½Ï¼òµ¥£¬²»¹ýÎÒûд³öÀ´¡£
----------------------------------------------------------------------------------------
ʹÓÃSyst ......
Java ¶ÁÈ¡ MySQL ÖÐÎÄ ÂÒÂë
³¡¾°:Java,eclipse£¬¶ÁÈ¡MySQLÊý¾Ý¿â£¬MySQL±àÂëΪutf-8
ÎÊÌ⣺¶Á³öÀ´µÄÖÐÎÄÔÚeclipseµÄÊä³ö´°¿ÚÖÐÏÔʾΪÂÒÂë
´íÎóµÄд·¨
1
System.out.print(new String( rs.getString("bib_author").getBytes("utf-8"),"GBK" ));
2
System.out.print( ......
public class Test2 {
public static void main(String[] args) {
// ¼òµ¥ÈÏʶÕýÔò±í´ïʽµÄ¸ÅÄî
/*
* p("abc".matches("...")); p("a8729a".replaceAll("\\d", "-")); Pattern
* p = Pattern.compile("[a-z]{3}"); Matcher m = p.match ......