How to solve java.lang.NoClassDefFoundError?

前端 未结 27 1488
暗喜
暗喜 2020-11-21 06:04

I\'ve tried both the example in Oracle\'s Java Tutorials. They both compile fine, but at run-time, both come up with this error:

Exception in thread \"main\"         


        
27条回答
  •  伪装坚强ぢ
    2020-11-21 06:34

    I use the FileSync plugin for Eclipse so I can live debug on Tomcat & I received NoClassFoundError because I had added a sync entry for the bin directory in the Eclipse workspace => classes in the metadata for Tomcat but hadn't also added a folder sync for the extlib directory in Eclipse =>

    C:\Users\Stuart\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\myApp\WEB-INF\lib

提交回复
热议问题