java.lang.NoClassDefFoundError: org/json/JSONObject

helloworlddm發表於2017-12-28

以下來自Stack OverFlow,親測可用
For Classpath reference: Right click on project in Eclipse -> Buildpath -> Configure Build path -> Java Build Path (left Pane) -> Libraries(Tab) -> Add External Jars -> Select your jar and select OK.

For Deployment Assembly: Right click on WAR in eclipse-> Buildpath -> Configure Build path -> Deployment Assembly (left Pane) -> Add -> External file system -> Add -> Select your jar -> Add -> Finish.

This is the proper way! Don’t forget to remove environment variable. It is not required now.
有時間看下Maven。
Try this. Surely it will work. Try to use Maven, it will simplify you task.

相關文章