While running my app as a Java Application, the included jar in projects Build Path is found and runs without any error. When I try to run the application by executing java -jar myApp.jar
the used class from the external jar isn't found.
Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.escomled.blackboard.impl.BlackboardImpl] for bean with name 'blackboard' defined in class path resource [appContext.xml];
如果未通过任何Maven插件将外部jar组合在一起,则可能需要将其添加到类路径中。
java -cp <path to external jar> -jar myApp.jar
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.