`

使用mail.jar时报Exception in thread "main" java.lang.NoClassDefFoundError:

阅读更多
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/BEncoderStream

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

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

具体方法如下:
用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了.[/color]
分享到:
评论

相关推荐

    java.lang.NoClassDefFoundError

    Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Message at com.bulktree.mail.SimpleMailTest.mail(SimpleMailTest.java:30) at com.bulktree.mail.SimpleMailTest.main(SimpleMailTest...

    flink依赖jar包——解决NoClassDefFoundError: com/sun/jersey

    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jersey/api/client/config/ClientConfig at org.apache.hadoop.yarn.client.api.TimelineClient.createTimelineClient(TimelineClient.java:...

    flink on yarn 缺少依赖NoClassDefFoundError: com/sun/jersey

    flink-hadoop-compatibility_2.12-1.7.1.jar javax.ws.rs-api-2.0.1.jar jersey-common-2.27.jar ...Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jersey/api/client/config/ClientConfig

    Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONObject,是因为缺少java-json.jar-附件资源

    Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONObject,是因为缺少java-json.jar-附件资源

    java.lang.NoClassDefFoundError错误解决办法

    "java.lang.NoClassDefFoundError错误解决办法" java.lang.NoClassDefFoundError错误是一种常见的Java错误,它发生在Java虚拟机在编译时能找到合适的类,而在运行时不能找到合适的类导致的错误。下面是该错误的解决...

    独立版commons-lang-2.6-exception,解决缺少NestableRuntimeException

    Exception in thread "main" Java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException 或者: Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang....

    slf4j-1.7.rar

    1.如果运行程序出现错误:“Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory”,这是因为项目缺少slf4j-api.jar和slf4j-log4j12.jar这两个jar包导致的错误。 2.如果运行程序...

    Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/spark/SparkConf

    敲黑板 ,引入的依赖 一定要 “compile” 或则 ... ${spark.jar.version} compile 在一个maven项目中,如果存在编译需要而发布不需要的jar包,可以用scope标签,值设为provided。如下: javax.servlet.jsp jsp-api

    jaxen-1.1-beta-6.jar

    Exception in thread "main" java.lang.NoClassDefFoundError: org/jaxen/JaxenException at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230) at org.dom4j.tree.AbstractNode.createXPath...

    okio-1.6.0.jar

    网络请求时需要依赖okio.jar这个包,不然出现:Exception in thread "main" java.lang.NoClassDefFoundError: okio/ByteString

    javamail.jar

    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/LineInputStream 原因是jar包版本不统一,解决方法如下: 删除Java EE 5 Libraries/javaee.jar/mail里的包有东西. 具体方法如下: ...

    javax.xml.bind.jar and sqljdbc42.jar

    主要解决Java连接Sql Server报错:Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter 另外赠送一个Sql 的jdbc驱动

    slf4j-api-1.7.6.jar

    异常四. Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory 缺少 slf4j-api-1.7.6.jar 包

    dom4j-1.6包

    Exception in thread "main" java.lang.NoClassDefFoundError: org/jaxen/JaxenException at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230) at org.dom4j.tree.AbstractNode.createXPath...

    java-json.jar

    sqoop1 import 时报错Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONObject。下载后,然后放到sqoop/lib目录即可。

    javax.xml.bind.jar

    报错Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/* 由于缺少了javax.xml.bind,这个包在jdk 8以上版本被移除,需要手动导入

    noggit-0.5.jar

    异常七. Exception in thread "main" java.lang.NoClassDefFoundError: org/noggit/CharArr 缺少noggit-0.5.jar

    短信猫西门子TC35测试

    1、如果报了如下错误: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger 那是因为没有把log4j-1.2.13.jar倒入到工程中。 2、如果报了如下错误: org.smslib.GatewayException:...

    tomcat启动报错:java.util.zip.ZipException的解决方法

    发现问题 早上起来报错误,Jenkins打包到tomcat服务器,死活启动不起来... java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFi

Global site tag (gtag.js) - Google Analytics