4

I have downloaded an open source project from github. it is a maven based project. How can I understand that is the project a J2SE project or a J2EE project? what are the diffrences in structure of these two kind of projects?

Atena
  • 471
  • 1
  • 6
  • 18

4 Answers4

1

A J2EE (known as JEE) project is only different from a J2SE project in the sense that it uses JEE components. A JEE project would make use of one or more of the following components listed here.

David
  • 19,577
  • 28
  • 108
  • 128
1

J2SE (changed to Java SE) is considered the foundation edition of the Java platform and programming environment in which all other editions are based.

J2SE project is for building standalone applications like swing, applets apps etc


J2EE (changed to Java EE) is the edition of the Java 2 platform targeted at developing multi-tier enterprise applications.

J2EE consists of a set of specifications, APIs and technologies defining enterprise application development. J2EE technology providers expose tools, frameworks and platforms that handle a good deal of the details of enterprise application infrastructure and behavior.

J2EE implementations enjoy all of the features of the Java 2 Standard Edition (J2SE) platform with additional frameworks and libraries added to support distributed/Web development.

Simply you can say that J2SE is standalone program with main method, where as J2EE projects are web apps with web.xml

More info on directory structure here

Community
  • 1
  • 1
gowtham
  • 977
  • 7
  • 15
  • can i conclude that if my project has main method it is a j2SE project? but my project has "import javax.servlet.http.HttpServletRequest;". does it mean that it is a j2EE project? you know, i know that this a client-server project, but i do not konw that if this is a EE project should i change my eclipse version. my current eclipse version is Eclipse Standard/SDK Version: Kepler Service Release 1 Build id: 20130919-0819 because of my problem with maven, i want to manually create a new project and without maven i want to run this. if the project is EE, should i change my eclipse? – Atena Jan 27 '14 at 17:15
  • @Atena - Use J2EE eclipse for webapps – gowtham Jan 28 '14 at 08:50
0

If we are talking about maven archetypes, it may mean that maven will generate different directories for your source and binary files. Maybe it will package your j2se project as a .jar (kind of a dynamic library), and will package the j2ee project as a .war or an .ear (different containers for web applications inside a j2ee server). You should read carefully your pom.xml in order to be aware of these differences (and know what you actually need for your project).

Please tell me if this has been of any help or if you need any more detailed info...

Jorge_B
  • 9,712
  • 2
  • 17
  • 22
  • thanks it is my whole project pom.xml(just important parts are mentioned) com.sun.jersey jersey-json ${jersey-version} com.sun.jersey jersey-client ${jersey-version} – Atena Jan 27 '14 at 17:27
  • is jar means that it is a j2SE project? – Atena Jan 27 '14 at 17:31
  • That means that the binary result of compiling your classes will be packaged into a .jar file, that is a simple library with compiled java code. The normal packaging in a j2ee project would be `war` or `ear` - that is, the containers for web applications to be deployed into a java app server. Please have a look at the maven tutorial to see the differences between them – Jorge_B Jan 27 '14 at 17:33
  • so can i conclude that my project is not j2ee? (sorry because my question) – Atena Jan 27 '14 at 18:32
  • No, with a jar packaging it is not deployable as is in a j2ee server. Normally a jar includes java libraries that you can use both in standard j2se and in j2ee applications - you can say your project could be a component of a j2ee application, but it is not at all a j2ee application itself – Jorge_B Jan 27 '14 at 19:41
  • And never be sorry to ask a question! It is the only way to learn something :) – Jorge_B Jan 27 '14 at 19:42
0

JAVAEE and JAVASE could be distinguished by the import and container reliability.
For instance: JAVASE seldomly needs javax.ejb package, while JAVAEE need it.

Also, EJB which is core component of JAVAEE application, need container support from web server. like weblogic websphere or jboss.
If you find it rather hard to run it on tomcat, it might possibly a JAVAEE application.

Rugal
  • 2,612
  • 1
  • 15
  • 16