java class jar 的加載問題

遇到了報錯:java

Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactoryapp

 

後面在stackoverflow上面找到了答案this

If you want to make a certain set of JAR files (or .class files) available to every Java application on the machine, then your best bet is to add those files to /Library/Java/Extensions.spa

Or, if you want to do it for every Java application, but only when your Mac OS X account runs them, then use ~/Library/Java/Extensions instead.code

EDIT: If you want to do this only for a particular application, as Thorbjørn asked, then you will need to tell us more about how the application is packaged.it

相關文章
相關標籤/搜索