开发者

Setting Up Developed Java Project in Eclipse

I am trying to set up some project in Eclipse which is already developed and has following file structure.

Setting Up Developed Java Project in Eclipse

Setting Up Developed Java Project in Eclipse

I know how to setup things in Eclipse and how to run it with Apache Tomcat but when I restart Tomcat it tries to build the web app with tons of errors. The errors are like failed to load libraries (.JAR) and the like. Let me tell you the project is loaded and set in Eclipse perfectly without any single Error. There are m开发者_StackOverflow中文版any packages in the project as well as JSP files. Why this is not working with Tomcat?


Ok, you have to set the build path of your project, that is right button click over the project, then build path. That build path must point to your java libraries, or almost every line of the project will be an error.


Get the original WAR file or if there is none, just zip the whole content in a single file which you rename with .war extension. Finally, if you have Eclipse for Java EE version, you can just do File > Import > WAR and select the file. Eclipse will automatically create a new Dynamic Web Project based on the WAR. If you have standard Eclipse version for Java (non-EE), then you need to upgrade Eclispe first.

However, if the WAR doesn't contain source code (the .java files) of the Java classes (the .class files) present in /WEB-INF/classes, then you'll need to decompile them with some Java decompiler like JD and then create the package structure with those decompiled classes in the project's source folder yourself.

As to the exceptions/errors you get when running it locally, you just need to fix them one by one, starting with the firstmost one. More than often some if not all of the subsequent errors will just disppear. If you fail in understanding the first exception/error, just press Ask Question on the right top here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜