java.lang.ClassNotFoundException when running in IntelliJ IDEA

前端 未结 5 1332
挽巷
挽巷 2020-11-22 11:33

I creating a program to work with databases and I am getting the following error when compiling in IntelliJ IDEA. Does anyone why this is happening and how I could solve it?

5条回答
  •  耶瑟儿~
    2020-11-22 12:19

    • the jar may not execute if one of the dependent jars is digitally signed since the new artifact will include the partial signature of the dependency. See this answer for more details.

    I must again emphasis the point CrazyCoder has here.

    The (Oracle) JVM used to throw a SecurityException when you tried to run a Jar-File containing broken signatures. This made sense from a "What's wrong"-Point of view.

    That is no longer the case. They are indeed throwing ClassNotFoundExceptions now - even if the class is right there in the file (no matter if it is in the default package/toplevel or way down in a nested package structure).

提交回复
热议问题