NoClassDefFoundError: javax/activation/DataSource

后端 未结 3 1160
南笙
南笙 2021-02-18 19:22

This is the code :

      Session session = Session.getDefaultInstance(props, null);
      Store store = session.getStore(\"imaps\");
      store.connect(\"im         


        
相关标签:
3条回答
  • 2021-02-18 19:23

    I solved a similar NoClassDefFoundError: javax/activation/DataSource problem in a mixed Java/Scala project by switching to Java 8 (it was Java9 by default).

    Discussion: https://github.com/highsource/jsonix-schema-compiler/issues/81

    0 讨论(0)
  • 2021-02-18 19:25

    I added activation.jar to buildpath and the problem is solved.

    So i used 2 jars java-mail-ima.** .jar, activation.jar (for further referebces).

    0 讨论(0)
  • 2021-02-18 19:38

    In case you use maven you can add manually

    <dependency>
        <groupId>javax.activation</groupId>
        <artifactId>activation</artifactId>
        <version>1.1.1</version>
    </dependency>
    
    0 讨论(0)
提交回复
热议问题