- 博客(7)
- 资源 (2)
- 收藏
- 关注
原创 用javamail api发送邮件时的异常
<br />Exception in thread "main" javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;<br /> nested exception is:<br /> java.net.ConnectException: Connection refused: connect<br /> at com.sun.mail.smtp.SMTPTransport.openServe
2010-08-24 22:35:00 1716
原创 JPassword.getPassword().toString()和String.value(JPassword.getPassword())的不同
<br />第一个是调用Object类的toString()方法<br />public String toString() {<br />return getClass().getName() + "@" + Integer.toHexString(hashCode());<br />}<br />第二个是新建一个String 对象<br />public String(char value[]) {<br />int size = value.length;<br />char[] v = new ch
2010-08-18 18:30:00 2487
原创 dom4j的Invalid byte 2 of 2-byte UTF-8 sequence错误
在用dom4j处理xml文件的时候遇到一个Invalid byte 2 of 2-byte UTF-8 sequence错误,网上找了解决方案,发现原因是dom4j对xml是utf-8编码,而utf-8编码的xml文档不能够被Xml解析器解析。在生成XMLWriter实例时,构造函数中的参数不应为FileWriter,而应该用FileOutputStream,这样就不会遇到编码错误,文档会被编码为gb2312或gbk
2010-08-17 11:52:00 1009
转载 The constructor BASE64Encoder() is not accessible due to restriction on required library
<br />在Eclipse中编写Java代码时,用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示:<br />Access restriction : The type BASE64Decoder is not accessible due to restriction on required library C:/Program<br />files/java/jre6/lib/rt.jar<br />Access restrictio
2010-08-16 17:35:00 1811
转载 百度地图api-根据地区名称反查其经纬度的实例
<br /><html><head><meta http-equiv="Content-Type" content="text ml; charset=utf-8"><title>MAPBaidu-http://www.k686.com</title><mce:script type="text/javascript" src=" http://api.map.baidu.com/api?key=458d39374361da27e548367a735831ba&v=1.0&services=
2010-08-16 14:22:00 6615
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人