I've been reading about differences between Java SE and Java EE. And everything it seems to be ok. But It seems doesn´t exists a Java EE JDK, is only a Java EE SDK.
Java EE 8 Platform SDK:
Java SE Development Kit
What is it that I am not understanding about Java EE and SE?
I read
Is there a Java EE JDK
but in simple words, why doesn't exist Java EE JDK?
To develop my comment, Will Hartung made a very good summary here:
Java SE -- Java Standard Edition, it happens to come in two versions: the JDK and JRE. JDK has the compiler and other tools.
Java EE -- Java Enterprise Edition is simply a standard, and a couple of libraries consisting mostly of just interfaces.
To put it simply, I used this analogy:
[The] question is like "there are cars and trucks. Why there is only garage and not garage for trucks? Because if you fix a car, you can fix a truck (more or less ^^)"
Related
I've read the sentence "Java EE is an extension for Java SE (a plain Java version)".
I'm having difficulties in understanding how they relate on a real application. For instance, if I had a Web Application, which of the following examples can be true?
I use Java EE 8. It is built over a specific Java SE version (which?). The moment I configure my project with Java EE 8, there's no need to configure any Java SE.
I use Java EE 8. This means I need to configure a SE version. It's a good idea to use Java EE 8 and Java SE 11 on my project, for example.
Something else.
Any example on how to configure this in real project, preferably Eclipse / Red Hat CodeReady Studio is greatly appreciated.
I've seen three possible Java version notations, e.g. Java 8 may be written in the following ways:
Java 8
Java 8 SE
java 1.8
Which is the correct one? I mean which one is usable in academic writing?.
Similar problem with JDK and JRE
If you are writing about Java Standard Edition, then the correct notation will be: Java SE 8, the same rule applies for Enterprise Edition (Java EE 7).
Java 8 and Java 1.8 are the same and Java 8 SE is standard Edition. Java 8 is good for academic writing.
The Java naming and versioning convention is unfortunately complicated. In fact, java versioning has its own Wikipedia page.
Versioning
Java started off its life in 1.0 and 1.1 in the mid 90s. When Java 1.2 was releases it was branded as "Java 2". We had to live with the next few releases with this dual numbering scheme until Java 1.5 when the "1." prefix was dropped and 1.5 officially became 5.0.
Java 8 being referred to as "Java 1.8" is an artifact of this history.
Java Editions
Java SE, the Java Platform, Standard Edition (also known as J2SE until Java 5) is the Java platform used for java desktop and server programs. Java SE is what most people mean when talking about Java.
Other "Editions" are Java ME (Micro Edition) which is a cut down version of Java for embedded devices (including phones) and Java EE (Enterprise Edition) which provides extra libraries on top of Java SE including Java Servlets, EJB, JMS and others used in Java Application Servers.
JRE vs JDK
JRE: Java Runtime Edition
JDK: Java Development Kit
Simply, the JRE is able to run Java progams; the JDK is used to build Java programs.
See Also
Why java is now known as java2?
What is the difference between JVM, JDK, JRE & OpenJDK?
Three of them are valid notations. There is no right or wrong all of them are used.
I don't think using either one of the options should make any difference. All convey the same thing and anyone using Java will know this.
However if you are concerned about academic writing then you can use
Java SE 8
and give reference as Wiki link :)
As per the java spec, java versions can be denoted as java 1.x.x
Java Standard edition (correct notation is Java SE 7)
JDK version can be represented as JDK 1.x.x, similar to JRE as x.
(If the version of JDK is (1.7.0) then the JRE version to be 7)
This question already has answers here:
Correlation between Java EE / J2EE to J2SE / JDK versions
(3 answers)
Closed 5 years ago.
I've been wondering if there is a correlation between versions of Java EE working on top of Java SE. I've found this question, but the answers there are outdated and not satisfying. My question is:
is there a tight coupling between EE and SE versions so that java EE 8 will only work with Java 1.8, java ee 7 will work only with java 1.7 and so on?
if above is false (i.e. you can mix versions), is above the preferred way? Does it make sense to run java EE 6 on java SE 1.8 (just an example)?
I know that Java EE is just a bag of specifications, but do these specifications enforce java SE version anyhow?
It's rather about which SE versions EE server can work with. Like here https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Installation_Guide/Java_Environments_Supported_By_JBoss_Enterprise_Application_Platform_61.html
As per oracle document here
Java EE
The Java EE platform is built on top of the Java SE platform. The Java
EE platform provides an API and runtime environment for developing and
running large-scale, multi-tiered, scalable, reliable, and secure
network applications.
So ideally Java SE must be higher or equivalent version when compared to JAVA EE. According to this statement its possible to run java EE 6 on java SE 1.8 and not the other-way round.
I am going to develop enterprise apps towards a WebSphere 8.5 server. WebSphere 8.5 works with Java EE 6 and Java SE 7.
So what does that mean as far as code development goes? Is Java EE just a set of additional enterprise libraries? Does Java EE 6 mean it uses Java 6 syntax? Can I use Java 7 syntax on an 8.5 server and still utilize the frameworks and webservices provided by Java EE 6?
Java EE is actually a set of specifications of various technologies. Each spec typically has an API (eg: javax.servlet.*, javax.ejb.* etc which is implemented by various vendors (eg: IBM websphere, JBoss, Weblogic etc). The idea is you only learn and write your code once, but you can use your code (with some adjustment) and your knowledge on various vendor implementation.
When you compile your war you typically have to include (for compilation purpose only -- not necessarily packaged) java ee api component of a particular version on your classpath (eg: java-servlet-2.5). The API component often has dependency to particular version of Java SE (eg: if the API / vendor implementation uses generics, it requires Java SE 5 or higher)
Java EE is required to be backward compatible, hence if you compile and package your war against Java EE 6 API, it will run on Java EE 7 container.
You don't necessarily have to use Java SE 7 API to run your code on Java EE 7, you can always compile your war against older version of Java EE API (hence older Java SE). New features will only available if you compile against latest version of the API.
Java EE specifications do target a specific Java SE release. For example, JSR 316 says: Java EE 6 is the Enterprise Edition of version 6 of the Java platform, and thus will be built on Java SE 6. Individual specs may still choose to be compatible with lower versions of Java SE, but never a higher version. Whether a Java EE implementation actually runs on a higher Java SE version that it was specced for depends on the implementation.
by #Arjan Tijms
So what does that mean as far as code development goes?
It means, that you should know Java SE to create apps with the Java EE standard. Java EE is based upon Java SE.
Java SE 7 tutorial
Java EE 6 tutorial
Is Java EE just a set of additional enterprise libraries?
Well, simplifying many things... Yes.
Does Java EE 6 mean it uses Java 6 syntax?
Can I use Java 7 syntax on an 8.5 server and still utilize the frameworks and webservices provided by Java EE 6?
You can use Java SE 7 syntax in Java EE 6 apps. But you can use Java SE 6 syntax too.
When I create a new enterprise application project in Netbeans 7.2.1, the IDE shouts out a recommendation: "Source Level 6 should be used in Java EE 6 projects".
Have a look at this screenshot:
Screenshot of Netbeans IDE 7.2.1 http://www.tinyuploads.com/images/Qs9Doh.png
Why is this practice recommended? Any reason not to follow the advice?
If you want to produce portable applications, Java SE 6 is the base on which Java EE 6 is defined.
From JSR 316: JavaTM Platform, Enterprise Edition 6 (Java EE 6) Specification:
EE.2.4.1Container Requirements
This specification requires that containers provide a Java Compatible™
runtime environment, as defined by the Java Platform, Standard
Edition, v6 specification (Java SE).
However, if you have a vendor-specific target Java EE 6 platform built on a newer version of Java you should often use its JDK as the target.
There's a trade-off between portability and being able to take advantage of container-specific features in enterprise development. NetBean's conservative recommendation is the correct option for those who don't know enough to make their own decision.