开发者

j2ee.jar - how can one confirm whether a java project needs 1. j2ee environment/web container [OR] 2. JRE to run

I 开发者_如何转开发have a Java project that references j2ee.jar. Is there an easy way to verify if the project needs j2ee environment or web container to run? Or if just having the JRE is sufficient?


If the project is a web project with a /WEB-INF folder with a web.xml file, contains eventually some HttpServlet classes and/or JSP files and the project is distributed in flavor of a WAR file, then it definitely requires a servletcontainer to run.

But if it doesn't and it is supposed to be executed as a Java application by a main() method, then it does not require a servletcontainer to run.

Probably the project is for some unobvious reason utilizing specific classes in the j2ee.jar. Hard to tell which ones it are and if it is really necessary. I'd import the project in an IDE, remove the j2ee.jar and check if IDE complains about missing imports.

Regardless, you would normally not include j2ee.jar in a project that way. It's a servletcontainer specific library which should alreay be shipped with the servletcontainer itself and should be untouched by the developer.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜