This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a big confusion regarding the Java platforms though I know the purposes of different Java platforms. The Java programming language is a part of J2SE. Is it also a part of J2ME and J2EE? Are their specific boundaries for the different Java technologies such that any specific technology is used under a particular platform? Thanks.
Swapnil S. Sonawane<br /> <br />B.Tech (Expected May 2009)<br />Computer Science, NIT Durgapur, India<br />SCJA 1.0
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.