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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If the project is a web project with a
/WEB-INFfolder with aweb.xmlfile, contains eventually someHttpServletclasses 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 thej2ee.jarand check if IDE complains about missing imports.Regardless, you would normally not include
j2ee.jarin 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.