J2SE is your core, Java environment. It provides the basic facilities for running Java programs on a computer, and it includes an
applet plug-in so you can run Java applets inside a web browser.
(Here's a page filled with crazy applets that will just blow your mind!) All the basic Java packages can be found in the J2SE package - java.util, java.lang, java.io, java.awt, javax.swing. You know, the core stuff.
Anyone with a desktop computer can install and run Java applications using J2SE.
What about J2EE? Well, J2EE provides a standard set of classes that make it possible to write and deploy applications to a server. So, the J2EE environment defines classes for creating
servlets (javax.servlet.http) and for ejbs. There's also other special packages for working with server based resources.
While J2SE is an environment for running applications, J2EE really provides an environment, or more accurately, containers, that manage and run resources that other client applications will connect to and use. So, servlets aren't an application, but they can be accessed by a web browser application. Similar with EJBs. An EJB isn't an application that runs on your computer, but instead, a resource an application running on your computer could potentially use.
J2EE can access all the packages defining in J2SE, such as java.lang and java.util. Sometimes people say J2EE is "built on top of J2SE" but I don't particularly like that oversimplification. I mean, it might be sorta true, but I don't think that's the way
you should think of J2EE and J2SE. I'd discourage that type of oversimplification.
That oversimplification is also bad because it doesn't apply to J2ME.
J2ME is an environment for creating midlets, or Java based wireless apps that run on handheld devices such as cell phones, pda, or even those handheld scanners used at Walmart, or those little devices the
water meter people use as they go from house to house.
Handheld devices are small and limited in power and memory, so J2ME doesn't provide all the classes and components you could use in a J2SE application. It's a scaled down set of classes and packages that allow you to do the basic thing needed on a handheld devices. There's not
alot of built in razzle-dazzle when it comes to J2ME - just the basics to get the job done.
So, that's about it. Make sense? Give me some feedback and let me know. This
SCJA forum has been quiet over the last little while.
-Cameron McKenzie
[ May 17, 2008: Message edited by: Cameron Wallace McKenzie ]