Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how many versions of java are there?

I am little confused about Java frameworks (I am coming from .NET). Do you need different server setups to run Java, J2EE and JSP? Does Java make a distinction in frameworks for enterprise and non-enterprise deployments? Beans? Struts?

Can someone make sense of this for me?

.NET has:

  1. Windows development (Winforms, WPF)
  2. web:
    i) webforms ii) mvc
like image 206
mrblah Avatar asked Nov 18 '25 20:11

mrblah


2 Answers

These are the most commonly used terms that correspond to your "Java versions":

  • JRE: Java runtime environment, what's needed to run Java programs
  • JDK: Java development kit, a JRE plus compiler and some additional tools
  • Jave SE: Standard Edition, the API library that comes with every JRE and JDK for desktop use
  • Jave EE: Enterprise Edition, additional APIs that extend the J2SE for business use, meaning mainly server applications - this includes JSPs
  • Jave ME: Mobile Edition, a set of APIs (mainly a subset of J2SE) for mobile devices like phones

(The latter three are often also written as J2SE, J2EE and J2ME meaning "Java 2 ___ Edition" - Sun's naming and versioning convention are rather confusing)

Note that all of these are basically specifications, and there are implementations from different vendors. For example, you can get a J2SE 6 JDK not only from Sun, but also from IBM and Oracle.

like image 167
Michael Borgwardt Avatar answered Nov 20 '25 12:11

Michael Borgwardt


There's a few different ways of looking at this.

Firstly, the only current version of Java is Java 6 currently at Update 17 or so. Java 5 and earlier have all been end-of-lifed. What's a little confusing is that starting at version 1.2 Java adopted the name "Java 2" (and was referred to as J2SE or "Java 2 Standard Edition") so it was Java 2 version 1.2. After Java 2 version 1.4 (or more simply Java 1.4). Version 1.5 became Java 5 or J5SE although J2SE is still pretty common.

The other version of Java that's relevant is Java Enterprise Edition ("Java EE"), formerly J2EE ("Java 2 Enterprise Edition") with version 6 being imminent. Java EE specifies a set of standards for server apps. The most important part is the servlets specification, which is the basis for 99.9% of Java Web frameworks. It has versions and is currently at either version 2.5 or 2.6 (I forget). Apache Tomcat is the reference implementation of the servlets specification.

Another part is EJB ("Enterprise Java Beans") currently at EJB3/3.1. It's a component architecture and really heavyweight. It's not used anywhere near as often as the base servlets specification.

Whereas Tomcat is a Web container, full Java EE supports is provided by what's called an application server. Examples include Glassfish, JBoss, Weblogic and Websphere.

Java classes are often packaged as JARs ("Java ARchives"), which is simply a zipped file with a specified directory structure.

Web applications are packaged as wars ("Web ARchive"), which is just a jar with a different extension. WARs may contain libraries in JAR form.

Full Java EE apps are packaged into EARs ("Enterprise ARchives"), which again is just a different file extension and it may contain war and other files.

Now to complicate this there are about a bazillion Java Web frameworks such as Struts, Spring MVC, Tapestry, Wicket and many, many others.

Also, it's fairly common for Java Web and enterprise apps to use the Spring framework. Spring is (imho) a must-have for Java serverside development as it simplifies a lot of vendor and library differences and makes your application far more pluggable.

Confused yet?

like image 26
cletus Avatar answered Nov 20 '25 12:11

cletus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!