J2ME - J2SE - J2EE

From Lunarpages Web Hosting Wiki
Jump to: navigation, search

What are the differences between the different Java platforms J2ME, J2SE, and J2EE?

J2SE is Sun's platform that includes the Java Virtual Machine (JVM) and packages. There is the core package which is basically the contents of rt.jar in the distribution package of J2SE. Then there are specification such as Swing and Networking.

There is also optional packages like the ones listed at http://java.sun.com/reference/api/index.html under J2SE Optional Packages including JAI, JCE, JDO and J3D.

There are many implementations of the J2SE platform such as Sun's JSDK, IBM's J9, Blackdown, and Kaffe. J2SE is something you would want to build on, something may want to learn and get to know since it's the basics.

J2EE on the other hand builds on top of J2SE (J2EE needs J2SE). It includes tools to create frameworks and API specifications suitable for companies. By specification, JSP and Servlets (and Beans) are J2EE. EJB (javax.ejb, javax.enterprise.deploy.*) is J2EE. As is JMS (javax.jms), JavaMail (javax.mail).

Then there is J2ME (Micro Edition) which runs on portable, mobile, handheld devices.

J2SE is where one should start and slowly learn the core packages, later branching into the optional packages. While Servlet/JSP is J2EE, it doesn't mean it must be packaged in J2EE. It is just specified as J2EE.

One reason why J2EE is not suitable for shared hosting is because of size. Java is huge and requires a couple of GB of memory even for J2SE. Sun's J2SE package is now less than 35 MB, while the J2EE is 98 MB.

Share |
Want to read this in another language?