Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream

如果你用MyEclipse进行开发的话,或是使用Spring Mail来发邮件的时候,运行时可能会出现以下的错误:
Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream


原因是jar包版本不统一,解决方法如下:

删除Java EE 5 Libraries/javaee.jar/mail里的包有东西.

具体方法如下:
用rar打开X:\Program Files\MyEclipse 6.6\myeclipse\eclipse\plugins\

com.genuitec.eclipse.j2eedt.core_6.6.0.zmyeclipse660200810\data\libraryset\EE_5\javaee.jar,

然后删除mail,然后就正常鸟.

//from http://www.800l.com/lineinputstream-error.html

MyEclipse8.5版本的javaee.jar地址

\MyEclipse 8.5\Common\plugins\com.genuitec.eclipse.j2eedt.core_8.5.0.me201003231033\

data\libraryset\EE_5

This entry was posted in Computer, Java. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s