java mail Ïà¹Ø
¡¾ÉùÃ÷¡¿×ªÌûµØÖ· £º http://tech.ddvip.com/2009-04/1239788309115180.html
MailSenderInfo .java :
package com.util.mail;
import java.util.Properties;
/**
* @author AllanKing
* @date 2009-11-12
*/
public class MailSenderInfo {
// ·¢ËÍÓʼþµÄ·þÎñÆ÷µÄIPºÍ¶Ë¿Ú
private String mailServerHost;
private String mailServerPort = "25";
// Óʼþ·¢ËÍÕߵĵØÖ·
private String fromAddress;
// Óʼþ½ÓÊÕÕߵĵØÖ·
private String toAddress;
// µÇ½Óʼþ·¢ËÍ·þÎñÆ÷µÄÓû§ÃûºÍÃÜÂë
private String userName;
private String password;
// ÊÇ·ñÐèÒªÉí·ÝÑéÖ¤
private boolean validate = false;
// ÓʼþÖ÷Ìâ
private String subject;
// ÓʼþµÄÎı¾ÄÚÈÝ
private String content;
// Óʼþ¸½¼þµÄÎļþÃû
private String[] attachFileNames;
/** */
/**
* »ñµÃÓʼþ»á»°ÊôÐÔ
*/
public Properties getProperties() {
Properties p = new Properties();
p.put("mail.smtp.host", this.mailServerHost);
p.put("mail.smtp.port", this.mailServerPort);
p.put("mail.smtp.auth", validate ? "true" : "false");
if(this.mailServerHost.indexOf("smtp.gmail.com")>=0)//¹ØÓÚgmailµÄssl·ÃÎʱ¨´íµÄ´¦Àí
{
p.setProperty("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
p.setProperty("mail.smtp.socketFactory.fallback", "false");
p.setProperty("mail.smtp.port", "465");
p.setProperty("mail.smtp.socketFactory.port", "465");
}
return p;
}
public String getMailServerHost() {
return mailServerHost;
}
public void setMailServerHost(String mailServerHost) {
this.mailServerHost = mailServerHost;
}
public String getMailServerPort() {
return mailServerPort;
}
public void setMailServerPort(String mailServerPort) {
this.mailServerPort = mailServerPort;
}
public boolean isValidate() {
return validate;
}
public void setValidate(boolean validate) {
this.validate = validate;
}
public String[] getAttachFileNames() {
return attachFileNames;
}
public void setAttachFi
Ïà¹ØÎĵµ£º
½Ó¿ÚÖв»¿ÉÒÔ¶¨Òå¹¹Ôì·½·¨
½Ó¿ÚÖÐÖ»ÄÜÓÐ public static final µÄ±äÁ¿ ºÍ public abstract µÄ·½·¨£¬ÆäËü¶¼²»¿ÉÒÔ¡£
ÀýÈ磺
´úÂëÀïÊÇÕâÑùдµÄ
public interface B{
StringBuilder sb=null;
void fun();
& ......
JAVA¿ÉÒÔͨ¹ýJNI½Ó¿Ú·ÃÎʱ¾µØµÄ¶¯Ì¬Á¬½Ó¿â£¬´Ó¶øÀ©Õ¹JAVAµÄ¹¦ÄÜ¡£Ê¹ÓÃJAVA JNI½Ó¿ÚÖ÷Òª°üÀ¨ÒÔϲ½Ö裺
(1)±àдJAVA´úÂ룬עÃ÷Òª·ÃÎʵı¾µØ¶¯Ì¬Á¬½Ó¿âºÍ±¾µØ·½·¨£»
(2)±àÒëJAVA´úÂëµÃµ½.classÎļþ£»
(3)ʹÓÃjavah -jni Éú³É¸ÃÀà¶ÔÓ¦µÄCÓïÑÔ.hÎļþ£»
(4)ʹÓÃC/C++ʵÏÖ£¨3£©Éú³ÉµÄ.hÎļþÖÐÉùÃ÷µÄ¸÷º¯Êý£»
(5)±àÒëC/ ......
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
ÔÚtomcatÖз¢²¼webÏîÄ¿£¬¿ÉÄÜÊÇÒòΪspringÖÐÅäÖÃÁËjndi£¨Ö»ÅäÖÃÁËjndi£¬ÆäËûµÄÓй¤¾ß°ü·â×°ÁË£©¡£
Æô¶¯µÄʱºò±¨´í£¨ÔÚÏîĿĿ¼Ï£¬ÔÚtomcatÖÐÅäÖÃcontextÖ¸ÏòÏîĿĿ¼¾ÍûÎÊÌ⣬´ò°ü·¢²¼µ½
tomcat¾Í±¨´íÁË£©£¬Å×µÄÒì³£ÊÇ£º
jav ......
repaint ¶Ô×é¼þ½øÐÐÖػ棬±ÈÈçÒ»¸öpanel£¬µ±ÄãremoveµôpanelÀïÃæµÄÒ»¸ö×é¼þʱ£¬Äã±ØÐëµ÷ÓÃrepaint·½·¨²ÅÄܶÔpanel½øÐÐÖػ棬½øÐÐˢУ¬ÄãÏëҪɾ³ýµÄ×é¼þ²ÅÄÜÔÚ½çÃæÉÏÏûʧ¡£
revalidate ¶Ô×é¼þ½øÐÐÑéÖ¤£¬±ÈÈçÒ»¸öpanel£¬µ±ÄãremoveµôpanelÀïÃæµÄÒ»¸ö×é¼þʱ£¬µ±Äãµ÷ÓÃrevalidate·½·¨ºó£¬panelµÄ²¼ ......
½üÀ´ÔÚ×öJAVAʱÓõ½ÎļþµÄѹËõÓë½âѹ,ÆäÖÐÅöµ½Á˸öÎÊÌâ:ÏÈÓÃJAVA´úÂë´ò°üºÃµÄJARÎļþ¾¹ýC#µÄzlib´¦Àíºó,¾¹È»²»ÄÜÐÞ¸Ä!
ÍøÉÏÕÒÁ˺ÃЩ´úÂ붼²»¿ÉÐÐ,JAVA´´½¨µÄJAR°üÔÚÐ޸ĵÄʱºò¿ÉÒÔ·¢ÏÖ¿ªÊ¼Óиö·¾¶·û'/'»ò'\',ËäÈ»ÔÚ´Ë¿ÉÒÔÐÞ¸ÄJARÎļþ,µ«ÊÇ×ܾõµÃÒþ»¼³öÔÚÕâ,ºóÀ´µÄÊÂÊ ......