views:

54

answers:

3
+1  Q: 

Java EE and JDK

I want to move from Java SE to Java EE. I will be using some of the sample projects that come with the Java EE. I have uninstalled the JDK but I think this may have been a mistake?

When I download the latest Java EE (6), upon installation it asks me for the location of the JDK (which is uninstalled). I was under the impression that the JDK was specific to each version of Java i.e. SE or EE. Am I wrong here? I would have thought that when I download Java EE 6 that it was actually the EE JDK?

Can anybody please clarify this for me?

GF

+4  A: 

Java EE is simply a set of APIs on top of Java SE. You'll need to re-install your Java SE JDK.

Nate
A: 

No, Java EE builds on top of Java SE. To get started developing Java web applications, you can download Apache Tomcat.

Michael Angstadt
Well so far I've reinstalled Java SE6 and am about to install Java EE 6. I was then planning on going through some of the sample EE applications. I would need a server ok but am unsure which route I want to take as of yet i.e. app server such as Glassfish or web server such as Tomcat.
I don't know too much about Glassfish. In all the Java jobs I've had, I've always used Tomcat. Tomcat isn't a full Java EE Application Server (it doesn't support EJBs), but it still supports servlets and JSPs, which is all you need for a normal web application.
Michael Angstadt
Can I ask you this then, are the words "web application" and "enterprise application" interchangeable?I am not being funny about this, I am new to Java EE and don't even fully understand what an actual enterprise app really is.
@user269799: in the context of Java EE, a "web application" typically uses Servlets, JSPs and technologies on top of those like JSF. An "enterprise application" would be characterized by the use of EJBs and JNDI. But there is no strict separation - enterprise apps very often contain a web app component.
Michael Borgwardt
@michael: thank you.
A: 

The JavaEE downloads from Sun's site are just the reference implementations. They build on top of the existing JDK. If you want to use the reference implementation, then go ahead... however, there are lots of other implementations instead.

If you're only doing web applications, you can get away with just a Servlet container.

Reference:
GlassFish v3 - Full JavaEE 6
GlassFish v3 Web Profile - Servlet-only JavaEE 6

Servlet-only:
Apache Tomcat - JavaEE 5
Jetty - JavaEE 5

Open Source Full:
Apache Geronimo - JavaEE 5
JBoss - JavaEE 5, partial 6

Commercial implementations:
IBM Websphere - JavaEE 5
Oracle Weblogic - JavaEE 5

R. Bemrose
So when I download Java EE 6, I am really only downloading a Server? I thought I would need some extra classes in the EE api?Is there an api included in the download?Also, if I am using Eclipse and it points to my old JDK, how can I make use of the new EE api?Sorry if my questions seem silly.GF
@user269799: yes, the Java EE distribution consists of API JARs as well as the reference implementations. You can configure eclipse projects to include those JARs into the build path, thereby giving you access to the API classes. With Java EE projects, eclipse will do this automatically.
Michael Borgwardt
@michael: once again.thank you.