Related
This question already has answers here:
Java JDK, SDK, SE?
(4 answers)
Closed 5 months ago.
Me has been fighting with internet for a while for that single answer. Everything else now seems standing on it's place after this trip.
When I ask "What's Java SE" they say "Java SE is set of core Java classes ...... platform ... develop desktop apps .... contains core libraries and APIs ..... Java EE is a spec set to be implemented ...... Java EE is built on top of the Java EE". Sometimes they mention javac and JVM, sometimes they don't. What they do never (almost) is mention JDK.
When I ask "What's JDK" they say "JDK is set of stuff that lets us build apps on Java including javac, JVM etc." and never (almost) mention Java SE.
When I ask "Difference between Java SE and JDK" they give me that page and nothing more to think about. What does this mean: "Java SE product name for JDK"? Can't clearly understang right now.
Lack of terminology presicion and experiece for me? Possibly yes. I think would be able to answer this question myself if I were more experienced.
The questions:
"Whether (Java SE) == (JDK) or not?" (pls with wide explanation and terminology clarifications when needed).
Is Java SE a spec set like Java EE or not?
Can I find precise definitions somewhere to look at?
Sorry for a big writing. It proves that I would really love to put an end to this.
“Java SE” is three things:
An abbreviation of “Java Standard Edition”
A trademark owned by Oracle Corp.
A set of specifications published by Oracle Corp.
Anybody in the world is free to write software that implements the Java SE specifications. In the past, several companies have done so.
However, anybody in the world is not free to use the trademark of Java. To use that trademark, a person or company is required to come to terms with Oracle in a licensing deal. Presumably that deal would require payment.
Long story short, and over-simplified for brevity… Some of the companies that previously wrote their own implementations of Java SE decided to join forces, combine their codebases, and publish the whole thing as open-source. These companies included Oracle, IBM, and Apple. Thus was born the OpenJDK project (Wikipedia). Since then, other companies and individuals have joined the project.
The OpenJDK name is a trademark owned by Oracle. However, Oracle has published permission allowing others to use the term with no payment required.
The OpenJDK project published source code to an implementation of the Java SE specifications. The project does not publish built binaries or installers.
Several vendors do publish built binaries or installers for implementations of the Java SE specs. Nearly all of these implementations rely largely, if not entirely, in the OpenJDK source code.
These binaries/installers vendors include, in no particular order:
Azul Systems
SAP
Amazon
Microsoft
IBM
Red Hat
Oracle
Adoptium
BellSoft
… and more.
Most of those built binary or installers products use OpenJDK in their name or in their descriptions, as allowed by Oracle. A few of those products may use the term Java or Java SE with explicit permission from Oracle.
There are other editions of Java technology:
Java Card (for smart cards, badges, etc.)
Java ME, or Micro Edition (for constrained devices)
Java EE, or Enterprise Edition (a wide collection of specifications that run on top of an implementation of the Java SE specs, aimed at developers making software for enterprise oriented users)
The first two, Java Card & Java ME are owned by Oracle. The third, Java EE, was donated by Oracle Corp to the Eclipse Foundation were it is now known as Jakarta EE. Jakarta EE is a collection of specifications, with various vendors publishing implementations.
The term “JDK” refers to Java Development Kit. This kit includes an implementation of the Java SE specs, plus tools to write Java apps. These tools include a compiler.
The term “JRE” refers to Java Runtime Environment. This is a JDK minus some of the software development tools.
The term “JVM” refers to Java Virtual Machine. A JVM is a piece of software that enables a Java-based app to execute at runtime on a particular kind of host computer and operating system. Java apps are platform-agnostic, in other words, are not “native”. So a Java app needs a particular JVM to know how to run on a Mac, on a PC, or on a mainframe.
Every JDK and every JRE contains a JVM.
1 . Yes, you can think of Java SE same as JDK.
Java SE is the 'base' platform that defines the Java language specification (JLS), the Java Virtual Machine Specification (JVMS), Standard library APIs, byte-code format, compilation tools, and the class loader.
Now, this is all concepts and specifications and community proposals (via JCP) until implemented into a set of software tools. The set of software and tools that implements all of the above is called JDK.
JDK is essentially a Software Development Kit (SDK). They simply decided to name it JDK.
2 . Yes, Java SE is basically a set of specs. An implementation must follow the spec and get it reviewed & approved by Oracle before they can call their implementation Java.
In the case of Java EE the specifications deal with libraries & APIs most of the time. In case of Java SE the specs also care about language and VM details. You take Java SE (the standard JDK) + add some libraries and now you have Java EE. Oracle refers to this as Java EE SDK though.
3 . Unless your life depends on it. Just understand the relationship between Java SE, Java EE, JDK, SDK, and you are good. Just connect the dots and be done with it.
I think your confusion stems from what Java is. Originally, most languages were like C, where you write code, and it gets compiled to a specific computer architecture/ISA (x86, ARM, whatever).
Java "changed the game" when it came on the market, because it was:
Free (many langs at the time were proprietary)
Enforced object oriented programming style (which all the cool kids were doing at the time)
It added the JVM. The JVM is installed on top of the ISA, it was a piece of middleware that meant that compiled Java code could "run anywhere" (in practice, this isn't strictly true, but it's aside the point)
Anyways, if you just need to run Java programs, you can just install the JVM/JRE (of which the JVM is a component). If you actually need to develop Java programs, you need one of these "editions," which supports more or less features, depending on what you are doing with it. If you're a hobbyist programmer, SE is fine. SE, EE, and ME all include the JRE, JVM and JDK.
For a start here is the language specification (what's the meaning of for) itself and the JVM (Java Virtual Machine) specification. A JVM knows how to execute the code in the end. (see https://docs.oracle.com/javase/specs/)
"Java SE" is the "Standard Edition" as opposed to "Java EE" which is the "Enterprise Edition"
Enterprises create webservers so Java EE specifies many things needed for running Java based Webservers like how to respond to web requests. There also additional libraries and webservers that adhere to that Java EE spec but they are still written in Java, i.e. what you do with plain Java (SE). See https://www.oracle.com/java/technologies/javaee-8-sdk-downloads.html
To run any kind of Java program you you'll need a JRE (Java Runtime Environment) which is in a way part of Java SE because it bundles all the core functionality of Java. The core libraries (like the implementation of the String class) as well as a JVM implementation (Oracle, OpenJDK, ...). Even an EE webserver would still require a JRE to run.
If you want to develop a Java program, you will also need a JDK (Java Development Kit) which is essentially a JRE plus extra tools, the compiler for example. The compiler takes .java files and create .class files which is what the JVM needs.
It's also in a way part JavaSE but I wouldn't says JavaSE = JDK.
Java SE and just "Java" is probably the same, the other terms all go into different aspects of Java.
I'm trying to understand the differences between Java SE and EE. There is a lot of information out there but from my current limited understanding, it seems like Java EE is just Java SE with some stuff added on top of it. Why can't I just use Java SE and import API or packages when I need them? For example if I need to be able to connect to a database I can import the JDBC API, is doing that any different that using JDBC in Java EE?
... it seems like JAVA EE is just JAVA SE with some stuff added on top of it.
That is incorrect.
In reality, Java EE is a specification, and a set of libraries that provide API interfaces to program against. What Java EE per se does NOT provide is the implementations of those interfaces.
A Java EE implementation is embodied in code that has been written by Java EE vendor. That implementation may or may not be a product that you have to pay for.
The other thing is that Java SE is not a part of Java EE. Not in any sense. Java EE APIs (and implementations) depend on a JVM and a Java SE class library, but they are separate things, and they are typically distributed separately.
Why can't I just use JAVA SE and import API or packages when I need them?
Assuming that you have downloaded the Java EE API JAR files (or your build tool has done it for you), you can compile your code against the Java EE APIs.
But you can't >>run<< your code on a plain Java SE platform because neither Java SE or the Java EE API JARs contain the classes that implements the Java EE APIs; i.e. the servlet framework, etcetera.
If you try a Java EE app without the vendor-provided code, it won't work. (If you don't believe me / us, try it for yourself.)
For example if I need to be able to connect to a database I can import the JDBC api, is doing that any different that using JDBC in JAVA EE?
JDBC used to be a Java EE API, but now it is a Java SE API. (Check the Java SE API documentation!)
But here's the thing. If you want to connect to a database using JDBC, your application needs to use database specific JDBC drivers ... which you get from the database vendor. (Just like you get a Java EE implementation from a Java EE vendor!)
Why can't I just import libraries into Java SE instead of paying for Java EE?
Most of this has been addressed above. But you also mentioned "pay for".
The reason you need to pay is because Java EE implementations are typically proprietary products. A company invested a lot of money in developing their codebase, and they want to make a return on that investment.
And indeed, from Java 9 onwards, Oracle Java SE is not free either ... for most use-cases.
In either case, there are three alternatives if you really don't want to pay:
Find a free (e.g. open source) implementation. They exist for Java SE and Java EE.
Develop your own implementation of the relevant specs. (That will be more expensive in terms of time than paying a vendor.)
Use the product without paying the required license fee, and hope that you don't get sued for a lot of money copyright violation, etcetera.
Isn't Java platform independent?
The Java programming language is platform independent.
The Java SE APIs are platform independent (more or less).
A Java SE implementation is NOT platform independent. If you download Java SE for Windows and try to run it on Linux, it won't work. (Never has, never will).
The "write once, run everywhere" mantra assumes that you have installed a Java SE implementation of the appropriate version on the platform. It doesn't imply that such an implementation exists, or that it will be available for free, or that it will be installed everywhere.
What "write once, run everywhere" mantra is actually saying is that you don't have to modify your Java application in order to make it run on another Java platform. (And note that there a number of caveats on the nature of the application for WORE. For example, it mustn't depend on native libraries or external applications that may or may not be present.)
Can't I import the Java EE library, get java.servlet.Servlet, program with it, the host my application server on any computer that has a connection to the internet and a static Ip address?
In two words: You can't.
No matter how many times or how many different ways you ask.
The Java EE libraries you mean only define interfaces. you don't need to pay for them. But you need an implementation of this interfaces. For instance, you can import Java EE library and you will get java.servlet.Servlet. But will have no implementation of this class.
To run a Java EE application you need a platform that, simple said, implements all these interfaces. Such platforms are so called so called Java EE runtimes or application servers like WildFly or WebSphere.
I've got a little question (just for a cultural purpose).
Would it be possible to download and install Java but not the standard edition ?
I know that Java SE contains basic and usefull functions / librairies (such as input /output).
Installing java without the "SE" is maybe useless and without any interest, but is it possible? if yes how ?
Many thanks,
Installing java without the "SE" is maybe useless and without any interest, but is it possible?
It is not possible. Oracle don't distribute a form of Java without libraries.
In fact, there is no such thing as Java without the libraries (SE or ME). The libraries are part of Java(tm) platform. If you managed to create something with the Java language and a JVM, but with partial, missing or incompatible libraries you couldn't call it Java1. Oracle owns the Java trademark, and they dictate the terms under which you are allowed to use it. If you used "Java" for a JVM / Library combination that doesn't pass the standard Java compatibility tests, you would likely get a "cease and desist" letter from Oracle's lawyers!
But more importantly, there is a significant subset of the Java SE runtime libraries that are essential for bootstrapping a JVM. If you were to build your own (ahem) Java build that left out critical classes, your JVM wouldn't work.
(And you cannot just simply2 write your own replacement for the Java SE library subset that the JVM depends on. There are many places where the C / C++ codebase for the OpenJDK JVM has intimate knowledge of the implementation details of the Java libraries. Figuring it all out ... from scratch ... would be challenging.)
Having said that, in Java 9 they introduced a tool called jlink which will produce a cut-down Java SE runtime for an application that only contains the libraries that are required by the application. Your can read about it here.
1 - For example, the Sun vs Microsoft lawsuit over Microsoft's attempt to "embrace and extend" Java 1.1. See What does Sun's lawsuit against Microsoft mean for Java developers?
2 - It's not impossible. Just a lot of really hard work.
The java command is traditionally from a SE installation. Typically in the JRE form, but occasionally I the JDK variation for advanced users. Others exist but are not for desktop usage.
So in that view you cannot install java without SE.
(note: Java EE is not a distribution as such but an API typically provides by big web servers)
Can I install Java but not Java SE?
Install? No. Not from any "official" distributions provided by Oracle, at least.
Why not?
Because Oracle doesn't package it that way. They offer 1) a Java SE development kit (JDK) which lets you create Java programs for yourself, or 2) a Java SE JRE which just lets you run Java programs that someone else created. There is no 3) Java without SE.
But couldn't they have given us option #3?
Could they have? Probably. Well, OK, maybe. Did they? No.
But theoretically it's possible, right?
Theoretically, I don't see why not. Theoretically, it ought to be possible to come up with a "Java" that's little more than a virtual machine and a compiler. Then, theoretically, using only this non-Java-SE Java language, you could either replicate the Java SE environment or develop an entirely new Java-based development platform.
https://www.tizen.org/ Tizen Mobile & IPad Linux very exciting.
Its allowing GCC. But does it run Dalvik JVM or OpenJDK?
Will then it will be compatible with 32-bit or 64-bit compilers?
Or we need to convert our source to be re-compiled using ARM compilers? of GCC?
Will it be easier to port C, Java code's now to Tizen? Where its complex and not natively available under Android phones/platforms?
As far as I know, it will be possible to package applications as DEB or RPM packages, you will be able to include an embedded VM (for example Avian VM) if you want, probably no JVM will be installed by default. JavaSE Embedded and OpenJDK should work (maybe with small modifications) under Tizen even though the documention only mentions C/C++ for native apps and HTML5/JavaScript for web apps. Moreover, there is no Java binding to its native APIs yet except those already available for Linux ARM and for APIs supported in any Linux distribution (for example JOGL 2.0). If you really need some help to use Java under Tizen, please contact the JogAmp Foundation here. Xerxes already succeeded in running JOGL 2.0 under Meego as you can see here, why not doing the same thing under Tizen?
N.B: Don't expect official Java support under Tizen.
If you check this two presentation from May:
Tips and Tricks: Designing Low-Power Native and Web Apps on page 3.
and this
Implementation of Standard Accessibility APIs for Tizen on page 9.
You see that basically Tizen will have two APIs and hence two types of applications:
Native;
Web(HTML5) pretty well documented already.
So no JVM or OpenJDK, don't know the Native API apps binaries will be compiled to but probably will know soon.
Since Tizen is pretty much in development you can check from time to time the official site.
This question already has answers here:
Difference between Java SE/EE/ME?
(14 answers)
Closed 7 years ago.
What's the main difference between Java SE and Java EE?
Java SE (formerly J2SE) is the basic Java environment. In Java SE, you make all the "standards" programs with Java, using the API described here. You only need a JVM to use Java SE.
Java EE (formerly J2EE) is the enterprise edition of Java. With it, you make websites, Java Beans, and more powerful server applications. Besides the JVM, you need an application server Java EE-compatible, like Glassfish, JBoss, and others.
Java SE stands for Java standard edition and is normally for developing desktop applications, forms the core/base API.
Java EE stands for Java enterprise edition for applications which run on servers, for example web sites.
Java ME stands for Java micro edition for applications which run on resource constrained devices (small scale devices) like cell phones, for example games.
http://www.dreamincode.net/forums/topic/99678-j2se-vs-j2ee-what-are-main-differences/
As far as the language goes it is not as though java changes. Java EE has access to all of the SE libraries. However EE adds a set of libraries for dealing with enterprise applications.
Java EE is more like a "platform" or an general area of development.
In Java SE you write applications that run as standalone java programs or as Applets. In JavaEE you can still do this, but you can also write applications that run inside of a Java EE container. The container can do a great amount of management for you such as scaling an application across threads, providing resource pools, and management features.
Java EE has a web framework based upon Servlets. It has JSP (Java Server Pages) which is a templating language that compiles from JSP to a Java servlet where it can be run by the container.
So Java EE is more or less Java SE + Enterprise platform technologies.
Java EE is far more than just a couple of extra libraries (that is what I thought when I first looked at it) since there are a ton of frameworks and technologies built upon the Java EE specifications.
But it all boils down to just plain old java.
Java SE refers to the standard version of Java and its libraries. Java EE refers to the Enterprise edition of Java which is used to deploy web applications.
Java EE is enterprise edition.
Includes jsp, servlets, beans, and some other stuff for server programming.
Java SE is standard edition. This is plain old Java. Includes GUI stuff.
First, J2SE and J2EE have been renamed. They're now Java SE and Java EE.
Essentially, Java SE is your standard Java designed for end-users. That's what you'd develop to for desktop applications. Java EE is the enterprise edition, designed for server programming, such as SOA and web applications.
Best description i've encounter so far is available on Oracle website.
Java SE's API provides the core functionality of the Java programming language. It defines everything from the basic types and objects of the Java programming language to high-level classes that are used for networking, security, database access, graphical user interface (GUI) development, and XML parsing.
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.
If you consider developing application using for example Spring Framework you will use both API's and would have to learn key concept of JavaServer Pages and related technologies like for ex.: JSP, JPA, JDBC, Dependency Injection etc.
Java SE contains all the base packages. Some of the base packages are written in Java and some are written in C/C++. The base packages are the fastest because there are no additional layers on top of their core functionality.
Java EE is a set of specifications and the respective implementations are all built using Java SE base packages which happen to already contain everything required for any application. For example, for a web application, here is a Java SE Web Server and a Java SE Database.
Java SE 9/10 is expected to contain better support for native in order to improve the inherent performance issues it has from being an interpreted language. Using the enormous Java EE implementations implies a willingness to sacrifice performance, scalability and a lot of time and money for education and updates, in exchange for project standardization.
JavaSE and JavaEE both are computing platform which allows the developed software to run.
There are three main computing platform released by Sun Microsystems, which was eventually taken over by the Oracle Corporation. The computing platforms are all based on the Java programming language. These computing platforms are:
Java SE, i.e. Java Standard Edition. It is normally used for
developing desktop applications. It forms the core/base API.
Java EE, i.e. Java Enterprise Edition. This was originally known as
Java 2 Platform, Enterprise Edition or J2EE. The name was eventually
changed to Java Platform, Enterprise Edition or Java EE in version 5.
Java EE is mainly used for applications which run on servers, such as
web sites.
Java ME, i.e. Java Micro Edition. It is mainly used for applications
which run on resource constrained devices (small scale devices) like
cell phones, most commonly games.
In Java SE you need software to run the program like if you have developed a desktop application and if you want to share the application with other machines all the machines have to install the software for running the application. But in Java EE there is no software needed to install in all the machines. Java EE has the forward capabilities. This is only one simple example. There are lots of differences.
The biggest difference are the enterprise services (hence the ee) such as an application server supporting EJBs etc.