search

Home  >  Q&A  >  body text

java - 关于引用第三方jar的二次打包

部门要求进行一些常规性的功能封装,可是发现很多引用了第三方的jar包,如果进行二次打包成jar包,会出现java.lang.NoClassDefFoundError的异常,导致没法使用,请教该怎么解决这种问题呢?

巴扎黑巴扎黑2776 days ago718

reply all(3)I'll reply

  • 怪我咯

    怪我咯2017-04-18 09:15:43

    Just add these third-party jar packages to the project's lib

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:15:43

    The IDE seems to have options such as compileDependencies when creating Artifact. You can package dependent jar packages, but these third-party jars must be added to the library first in the project

    reply
    0
  • PHPz

    PHPz2017-04-18 09:15:43

    In your project, check whether the jar package where your class is located is imported. If not, you can use mvn install to import it.

    reply
    0
  • Cancelreply