J2SE and J2EE difference

Z

zhangyuewuliu

Hi,

I have a few confusions about J2SE and J2EE. If you can help to
clarify, that would be great.

1. What is the biggest difference between J2SE and J2EE? Is it just
that J2EE contains a few more extras libraries?
2. When I installed Java EE 5, the JRE installed is Java SE Run Time
library 6. Does it mean that J2EE and J2SE uses the same JRE?
3. Another question is regarding the J2EE implementations, like JBoss
and Sun Java System Application Server. Where does this piece come
into play? What is it used for? If I wrote an application with J2EE,
do I only need the JRE to run it, or I need the application servers to
run it?

Thanks.
 
L

Lew

Hi,

I have a few confusions about J2SE and J2EE. If you can help to
clarify, that would be great.

1. What is the biggest difference between J2SE and J2EE? Is it just
that J2EE contains a few more extras libraries?

JSE (they dropped the "2") is the core Java language and APIs. JEE (they
dropped the "2") is a collection of specifications for web-enabled development.

The phrase "just that X contains a few more extras [sic] libraries" makes it
sound like libraries aren't important. They are. It isn't "just" that JEE
specifies more libraries, it's what those libraries can do.
2. When I installed Java EE 5, the JRE installed is Java SE Run Time
library 6. Does it mean that J2EE and J2SE uses the same JRE?

The JRE is an implementation of JSE. Let me say that again: the JRE /is/ your
JSE. JSE doesn't "use" the JRE - the JRE is your JSE. Similarly, Tomcat or
JBoss or Sun App Server or WebSphere or Oracle App Server or BEA ... is your JEE.
3. Another question is regarding the J2EE implementations, like JBoss
and Sun Java System Application Server. Where does this piece come
into play? What is it used for? If I wrote an application with J2EE,
do I only need the JRE to run it, or I need the application servers to
run it?

JBoss or Tomcat or whatever is your JEE. Without one (or more) of those you
don't have JEE. You need an application server to run such an application.

Put another way, to run JEE you must have JEE.

There are tutorials on java.sun.com. Also, GIYF and WIYF.
 
Z

zhangyuewuliu

Thanks for the reply. I still have one question that confuses me.

1. I know JBoss and the Sun App Server is an implementation for JEE.
but is Tomcat a complete implementation for JEE, or it only supports
the servlet and JSP part of the JEE specification?

2. So for JSE, sun provides the implementation as JRE. But for JEE, a
lot of vendors are providing different implementations. Is there a
reason for that?

Thanks.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

1. What is the biggest difference between J2SE and J2EE? Is it just
that J2EE contains a few more extras libraries?

J2SE/JSE = compiler and other tools + virtual machine + basic library
J2EE/JEE = enterprise library + some specifications that provide a
contract between the compliant applications and the
compliant app servers
2. When I installed Java EE 5, the JRE installed is Java SE Run Time
library 6. Does it mean that J2EE and J2SE uses the same JRE?

J2EE/JEE needs a J2SE/JSE implementation.
3. Another question is regarding the J2EE implementations, like JBoss
and Sun Java System Application Server. Where does this piece come
into play? What is it used for? If I wrote an application with J2EE,
do I only need the JRE to run it, or I need the application servers to
run it?

Your J2EE/JEE application needs an J2EE/JEE application server
and both need a J2SE/JSE implementation.

Arne
 
G

Guest

Lew said:
JSE (they dropped the "2") is the core Java language and APIs. JEE
(they dropped the "2") is a collection of specifications for web-enabled
development.

Actually JEE can be used in non web context. It is not so common,
but it is seen.

Arne
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

1. I know JBoss and the Sun App Server is an implementation for JEE.
but is Tomcat a complete implementation for JEE, or it only supports
the servlet and JSP part of the JEE specification?

No - Tomcat is not a complete JEE implementation.
2. So for JSE, sun provides the implementation as JRE. But for JEE, a
lot of vendors are providing different implementations. Is there a
reason for that?

Same thing.

SUN, IBM, BEA, Oracle and possible other does all provide a JSE
implementation (both in JDK and JRE flavour - JDK has compiler
and some other development tools - JRE does not).

Redhat/JBoss, IBM, BEA, SUN, Apache (Geronimo not Tomcat !),
ObjectWeb, Pramati etc. all provide JEE application servers.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top