`

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/Lin

阅读更多
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream
	at javax.mail.Session.loadProvidersFromStream(Session.java:928)
	at javax.mail.Session.access$000(Session.java:174)
	at javax.mail.Session$1.load(Session.java:870)
	at javax.mail.Session.loadResource(Session.java:1084)
	at javax.mail.Session.loadProviders(Session.java:889)
	at javax.mail.Session.<init>(Session.java:210)
	at javax.mail.Session.getInstance(Session.java:249)
	at com.pdt.util.EmailUtil.sendMail(EmailUtil.java:98)
	at com.pdt.util.EmailUtil.main(EmailUtil.java:137)

 这是javamail发送报的错,主要是因为使用myeclipse工具导致

解决办法是:用rar打开X:/Program Files/MyEclipse 6.0/myeclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_6.0.1.zmyeclipse601200710/data/libraryset/EE_5/javaee.jar

,然后删除mail,一切就ok了.

不解决可以qq:443628678

0
0
分享到:
评论
2 楼 卢水发 2013-01-31  
是的
1 楼 medbricom 2013-01-31  
这个错误是因为和java内部的mail包冲突了,你自己重新导入mail就ok了

相关推荐

Global site tag (gtag.js) - Google Analytics