j2ee.jar - how can one confirm whether a java project needs 1. j2ee environment/web container [OR] 2. JRE to run
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.
加载中,请稍侯......
精彩评论