Including JAR files in Eclipse (App Engine) project

风格不统一 提交于 2019-12-03 01:44:18

You are on the right track. Since the app when deployed to appengine is packaged as a war (web application archive), library jars need to be in WEB-INF/lib. You should ensure your jars are there and then add those jars to your eclipse build path. Try doing a "clean" operation on the project and re-building it to ensure the libraries is in the package.

this solution that:

  • copy source (.jar file) into war/WEB-INF/lib folder

You still need to add the jar files to the java build path to avoid compilation errors after adding the files to the war/WEB-INF/lib folder!

Copy paste the .jar files to war/WEB-INF/lib and then go to Properties(of the project in Eclipse) --> Java Build Path --> Add JARs --> Select the related .jars from the current project. You should be all set!

Might be "a little" too late for this, but in eclipse you don't have to manually copy. Right-Click on project -> Build Path -> Configure Build Path... -> select Deployment Assembly (left). Add your jars here and they will be included when deploying.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!