¹ØÓÚ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
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
±¾ÌùÕª×Ô http://bbs.langsin.com/redirect.php?tid=9936&goto=lastpost
Ïë´òÓ¡Ò»¸öString ±äÁ¿µÄµØÖ·£¬ÇëÎÊÈçºÎÀ´Ð´£¿
²»ÊÇhashcode£¬¾ÍÊÇÄÚ´æµØÖ·£¬¶øÇÒÒª´òÓ¡³öÀ´¡£
Ò²Ðí±È½Ï¼òµ¥£¬²»¹ýÎÒûд³öÀ´¡£
----------------------------------------------------------------------------------------
ʹÓÃSyst ......
//´ò¿ª¹¤¾ßµÄ·¾¶¼°Ãû×Ö
String toolsPath = "D:/office/Office12/WINWORD.EXE";
//±»´ò¿ªÎļþµÄ·¾¶¼°Ãû×Ö
String fileName = " D:/test.doc";
try {
Process p = Runtime.getRuntime().exec(toolsPath+fileName);
} catch (IOException e) {
// T ......
ΪÁËÀí½âjavaµÄclone£¬ÓбØÒªÏÈÎÂϰÒÔϵÄ֪ʶ¡£
javaµÄÀàÐÍ£¬javaµÄÀàÐÍ·ÖΪÁ½´óÀ࣬һÀàΪprimitive£¬Èçint£¬ÁíÒ»ÀàΪÒýÓÃÀàÐÍ,ÈçString,ObjectµÈµÈ¡£
javaÒýÓÃÀàÐ͵Ĵ洢£¬javaµÄÒýÓÃÀàÐͶ¼ÊÇ´æ´¢ÔÚ¶ÑÉϵġ£
public class B {
int a;
String b;
public B(int a, String b) { ......
javaÖеľ²Ì¬´úÀíÓ붯̬´úÀí
±¾À´´òËã½ñÌìдµãjpa·½ÃæµÄ¶«Î÷£¬½á¹û¸ãÉÏÁË´úÀí£¬Ë÷ÐԾͰÑÑо¿³É¹û·Å³öÀ´°É£¬javaÖеĴúÀíÓÐÁ½ÖÖÒ»ÖÖÊǾ²Ì¬´úÀíÒ»ÖÖÊǶ¯Ì¬´úÀí£¬¾²Ì¬´úÀíÆäʵºÜÈÝÒ×Àí½â£¬¾²Ì¬´úÀíÆäʵ¾ÍÊǸö×°ÊÎÆ÷¶øÒÑ£¬¶ø¶¯Ì¬´úÀíÔò½èÖúÓÚjvmµÄÖ§³Ö£¬ÔÚÔËÐÐʱ¶¯Ì¬Éú³É´úÀíÀà¡£
ÔÚÕ ......