péter jeszenszky faculty of informatics, university of ...5 java (programming language) (3) a...
TRANSCRIPT
Java Technology Overview
Péter JeszenszkyFaculty of Informatics, University of Debrecen
Last modified: February 8, 2020
2
Terminology
● Java (programming language)● Java Virtual Machine (JVM)● Java Platform● Java Platform, Standard Edition (Java SE)● Java Platform, Enterprise Edition (Java EE)● Java Runtime Environment (JRE)● Java Development Kit (JDK)● OpenJDK● Java Community Process (JCP)● Java Specification Request (JSR)● JDK Enhancement Proposal (JEP)
3
Java (Programming Language) (1)
● The language was developed at Sun Microsystems in the 90s. The company was acquired by Oracle in 2009.– The father of the language: James Gosling
http://nighthacks.com/jag/blog/400/● Website: https://www.oracle.com/java/
4
Java (Programming Language) (2)
● The language can be characterized by the following buzzwords:– Simple– Object oriented– Distributed– Multithreaded– Dynamic– Architecture neutral– Portable– High performance– Robust– Secure
● See: The Java Tutorials – Trail: Getting Started – Lesson: The Java Technology Phenomenon – About the Java Technology https://docs.oracle.com/javase/tutorial/getStarted/intro/definition.html
5
Java (Programming Language) (3)
● A general-purpose, concurrent, class-based, object-oriented language.
● Related to C and C++ but is organized rather differently, with a number of aspects of C and C++ omitted and a few ideas from other languages included.
● Strongly and statically typed.● Java programs are normally compiled into a machine-
independent byte code representation that is intended to be executed by virtual machines.
● See: The Java Language Specification, Java SE 11 Edition https://docs.oracle.com/javase/specs/
6
Java (Programming Language) (4)
● A multi-paradigm programming language that supports the following paradigms:– Functional (introduced in Java SE 8)– Generic– Imperative– Object oriented (class-based)– Concurrent– Structured
7
Java (Programming Language) (5)
● The latest version is Java 13.● Language specification:
– James Gosling, Bill Joy, Guy Steele, Gilad Bracha, Alex Buckley, Daniel Smith. The Java Language Specification, Java SE 13 Edition. 2019. https://docs.oracle.com/javase/specs/
8
Java (Programming Language) (6)
● According to the Tiobe Index, it is currently the most popular programming language.– See:
● TIOBE Index https://www.tiobe.com/tiobe-index/● TIOBE Programming Community Index Definition
https://www.tiobe.com/tiobe-index/programming-languages-definition/
● See also:– PYPL PopularitY of Programming Language
http://pypl.github.io/PYPL.html
9
Java Virtual Machine (1)
● An abstract computing machine with an instruction set that knows nothing of the Java programming language,only of a particular binary format, the class file format.
– A class file contains Java virtual machine instructions (or bytecodes) and a symbol table, as well as other ancillary information.
● The Java Virtual Machine is the cornerstone of the Java platform. It is the component of the technology responsible for its hardware- and operating system-independence, the small size of its compiled code, and its ability to protect users from malicious programs.
● Specification:– Tim Lindholm, Frank Yellin, Gilad Bracha, Alex Buckley. The Java Virtual
Machine Specification, Java SE 11 Edition. 2018. https://docs.oracle.com/javase/specs/
10
Java Virtual Machine (2)
● Free and open source implementations:– HotSpot (operating system: cross-platform; license: GPLv2)
http://openjdk.java.net/groups/hotspot/ ● The virtual machine of OpenJDK.
– Eclipse OpenJ9 (operating system: AIX, Linux, macOS, Windows; license: Apache License 2.0/Eclipse Public License 2.0) https://www.eclipse.org/openj9/ https://github.com/eclipse/openj9
● A virtual machine originally developed by IBM (J9).● Is an alternative to the HotSpot virtual machine for OpenJDK.
● Non-free implementations:– PTC Perc (operating system: Linux)
https://www.ptc.com/en/products/developer-tools/perc– Zing (operating system: Linux) https://www.azul.com/products/zing/
11
Java Platform (1)
● A platform is the hardware or software environment in which a program runs.– Examples: an embedded system, operating system, web browser, …
● A software-only platform that runs on top of other hardware-based platforms and has the following two components:– The Java Virtual Machine (JVM)– The Java Application Programming Interface (API)
● See: The Java Tutorials – Trail: Getting Started – Lesson: The Java Technology Phenomenon – About the Java Technology https://docs.oracle.com/javase/tutorial/getStarted/intro/definition.html
12
Java Platform (2)
● Java platforms:– Java Card
https://www.oracle.com/java/technologies/java-card-tech.html
– Java Platform, Enterprise Edition (Java EE) https://www.oracle.com/java/technologies/java-ee-glance.html
– Java Platform, Micro Edition (Java ME) https://www.oracle.com/java/technologies/javameoverview.html
– Java Platform, Standard Edition (Java SE) http://www.oracle.com/technetwork/java/javase/overview/index.html
13
Java SE (1)
● A platform for developing and deploying Java applications on desktops and servers.– Many identify the Java SE API as the Java
programming language.● Website:
http://www.oracle.com/technetwork/java/javase/overview/index.html
14
Java SE (2)
● Its current version is Java SE 11 (18.9 LTS) released on September 25, 2018.– See: Oracle Boosts Software Development Productivity with New Java
Release https://www.oracle.com/corporate/pressrelease/java-11-092518.html
● Specification:– JSR 384: Java SE 11 (18.9) https://www.jcp.org/en/jsr/detail?id=384
● Documentation: https://docs.oracle.com/en/java/javase/11/– Migration: Oracle JDK Migration Guide, Release 11
https://docs.oracle.com/en/java/javase/11/migrate/– API documentation:
https://docs.oracle.com/en/java/javase/11/docs/api/index.html
15
Java SE (3)
● Its current version is Java SE 13 released on September 17, 2019.– See: Oracle Keeps Driving Developer Productivity with New Java
Release https://www.oracle.com/corporate/pressrelease/oow19-new-java-release-091619.html
● Specification:– JSR 388: Java SE 13 https://www.jcp.org/en/jsr/detail?id=388
● Documentation: https://docs.oracle.com/en/java/javase/13/– Migration: Oracle JDK Migration Guide, Release 13
https://docs.oracle.com/en/java/javase/13/migrate/– API documentation:
https://docs.oracle.com/en/java/javase/13/docs/api/index.html
16
Java SE (4)
● The next version is Java SE 14 implemented by JDK 14.– JDK 14 will be released on March 17, 2020.
● See: https://openjdk.java.net/projects/jdk/14/
● Specification:– JSR 389: Java SE 14
https://jcp.org/en/jsr/detail?id=389● API documentation:
https://download.java.net/java/early_access/jdk14/docs/api/
17
Java SE (5)
● The two types of Java SE implementations:– Java Runtime Environment (JRE)– Java Development Kit (JDK)
● Starting with JDK 11 there is no separate JRE!
18
Java SE (6)
Source: Java Platform Standard Edition 8 Documentation https://docs.oracle.com/javase/8/docs/
19
Java Runtime Environment (JRE) (1)
● Includes a Java virtual machine, class libraries, and other files that support the execution of programs written in the Java programming language.
● Implementations:– OpenJDK (operating system: Linux, macOS, Windows;
license: GPLv2 + Classpath Exception) http://openjdk.java.net/
– Oracle JRE (operating system: Linux, macOS, Solaris SPARC, Windows; license: Oracle Technology Network License Agreement for Oracle Java SE) https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
20
Java Runtime Environment (JRE) (2)
● Server JRE:– A JRE for running server-side applications.
● Contains both JRE and JDK tools but is smaller in size compared to a JDK.
– See:● Aurelio Garcia-Ribeyro. Understanding the Server JRE.
July 27, 2017. https://blogs.oracle.com/java-platform-group/understanding-the-server-jre
● Server JRE (Java SE Runtime Environment) 8 Downloads https://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html
21
Java Development Kit (JDK) (1)
● A development environment for building applications and components using the Java programming language.– Includes a complete JRE plus tools for developing,
debugging, and monitoring Java applications.● See: Oracle JDK 11 Documentation – Java Platform,
Standard Edition – Tools Reference https://docs.oracle.com/en/java/javase/11/tools/
22
Java Development Kit (JDK) (2)
● Non-free implementations:– Oracle JDK (operating system: Linux, macOS,
Solaris SPARC, Windows) https://www.oracle.com/technetwork/java/javase/downloads/index.html
● License: Oracle Technology Network License Agreement for Oracle Java SE https://www.oracle.com/technetwork/java/javase/terms/license/javase-license.html
– Zulu Enterprise (operating system: Linux, macOS, Solaris, Windows) https://www.azul.com/products/zulu-enterprise/
23
Java Development Kit (JDK) (3)
● Free and open source implementations:– OpenJDK (operating system: Linux, macOS, Windows; license: GPLv2 +
Classpath Exception) http://openjdk.java.net/– Oracle OpenJDK (operating system: Linux, macOS, Windows; license:
GPLv2 + Classpath Exception) http://jdk.java.net/– AdoptOpenJDK (operating system: Linux, macOS, Windows, AIX,
Solaris; license: GPLv2 + Classpath Exception) https://adoptopenjdk.net/– Amazon Corretto (operating system: Amazon Linux 2, macOS, Windows;
license: GPLv2 + Classpath Exception) https://aws.amazon.com/corretto/– Zulu (operating system: Linux, macOS, Windows; license: GPLv2 +
Classpath Exception) https://www.azul.com/downloads/zulu/
24
Java Development Kit (JDK) (4)
● See also:– Stephen Colebourne. Time to look beyond Oracle's
JDK. 3 September 2018. https://blog.joda.org/2018/09/time-to-look-beyond-oracles-jdk.html
25
OpenJDK (1)
● “The OpenJDK Community is an association of developers who collaborate upon open-source implementations of present and future versions of the Java Platform, Standard Edition, as defined by the Java Community Process, and upon closely-related projects.”– See: OpenJDK Bylaws – Preamble
http://openjdk.java.net/bylaws● Website: http://openjdk.java.net/
26
OpenJDK (2)
● In May 2006 at the JavaOne conference Sun Microsystems announced that they were going to open source Java technology.
● As a first step, the company released the source code of the Java HotSpot virtual machine and the Java compiler (javac) under the GPLv2 on November 13, 2006.– See: Sun Opens Java
https://web.archive.org/web/20070517164922/http://www.sun.com:80/2006-1113/feature/story.jsp
● Finally, on May 8, 2007, the company released almost the entire source code of the JDK under the GPLv2.– See:
● Open JDK is here! (May 8, 2007) http://mail.openjdk.java.net/pipermail/announce/2007-May/000000.html
● OpenJDK https://web.archive.org/web/20070510033950/http://openjdk.java.net:80/
27
OpenJDK (3)
● Starting with version 7, Oracle JDK and the official reference implementations of all versions of Java SE are all based on OpenJDK:– Java SE 7 Reference Implementations http://jdk.java.net/java-se-ri/7– Java SE 8 Reference Implementations http://jdk.java.net/java-se-ri/8– Java SE 9 Reference Implementations http://jdk.java.net/java-se-ri/9– Java SE 10 Reference Implementations http://jdk.java.net/java-se-ri/10– Java SE 11 Reference Implementations http://jdk.java.net/java-se-ri/11 – Java SE 12 Reference Implementations http://jdk.java.net/java-se-ri/12– Java SE 13 Reference Implementations http://jdk.java.net/java-se-ri/13
28
Oracle JDK and OpenJDK (1)
● Before JDK 11:– The source code of the two JDKs are largely identical, however,
Oracle JDK contains commercial features.● See: Java Components – Commercial Features
https://web.archive.org/web/20180825011439/https://docs.oracle.com/javacomponents/index.html
– Example: Java Mission Control (jmc) http://www.oracle.com/technetwork/java/javaseproducts/mission-control/index.html
– Oracle promised to open source the commercial features of Oracle JDK.
● The goal was to to reduce the differences between Oracle JDK and OpenJDK.● See: Mark Reinhold. Accelerating the JDK release cadence. September 6,
2017.http://mail.openjdk.java.net/pipermail/discuss/2017-September/004281.html
29
Oracle JDK and OpenJDK (2)
● Starting with JDK 11:– The Oracle JDK and OpenJDK are functionally identical
and interchangeable.● There are a small number of differences, some of them are
cosmetic only (for example, the output of the java -version command is different).
● Their packaging is also different.
– However, they have substantially different licensing terms!– See: Donald Smith. Oracle JDK Releases for Java 11 and
Later. September 11, 2018. https://blogs.oracle.com/java-platform-group/oracle-jdk-releases-for-java-11-and-later
30
Changes to the Release Model of Java SE (1)
● See:– Mark Reinhold. Moving Java Forward Faster.
September 6, 2017. https://mreinhold.org/blog/forward-faster
– Mark Reinhold. Accelerating the JDK release cadence. September 6, 2017. http://mail.openjdk.java.net/pipermail/discuss/2017-September/004281.html
– Donald Smith. Faster and Easier Use and Redistribution of Java SE. September 6, 2017. https://blogs.oracle.com/java-platform-group/faster-and-easier-use-and-redistribution-of-java-se
31
Changes to the Release Model of Java SE (2)
● The Java SE Platform and the JDK have evolved in large, irregular, and somewhat unpredictable steps.
Version Release Date Time elapsed since the previous version
JDK 1.0 1996-01-23
JDK 1.1 1997-02-19 1 year and 1 month
J2SE 1.2 1998-12-08 1 year and 10 months
J2SE 1.3 2000-04-08 1 year and 4 months
J2SE 1.4 2002-02-06 1 year and 10 months
J2SE 5.0 2004-10-04 2 years and 8 months
Java SE 6 2006-12-23 2 years and 3 months
Java SE 7 2011-07-28 4 years and 7 months
Java SE 8 2014-03-18 2 years and 8 months
Java SE 9 2017-09-21 3 years and 6 months
32
Changes to the Release Model of Java SE (3)
● A feature release typically contains one or a few significant features.– The development of those features is time
consuming, thus, smaller features could be delivered when the big features were ready.
● For Java to remain competitive with platforms evolving at a more rapid pace, it must not just continue to move forward, it must move forward faster.
33
Changes to the Release Model of Java SE (4)
● Developers prefer rapid innovation, enterprises prefer stability, however, everyone prefers regular and predictable releases.
● To address these differing desires, a time-driven was proposed, with a feature release every two years.– See: Mark Reinhold. Project Jigsaw: Late for the train.
July 17, 2012. https://mreinhold.org/blog/late-for-the-train– This model proved unworkable in practice, and is, in
retrospect, simply too slow.
34
Changes to the Release Model of Java SE (5)
● The proposed release model was inspired by the release models used by other platforms and by various operating-system distributions:– A feature release every six months:
● Feature releases can contain any type of feature, including not just new and improved APIs but also language and JVM features.
● These releases will ship in March and September of each year, starting in March of 2018.
– Update releases every quarter:● Update releases will be strictly limited to fixes of security issues and bugs.● Each feature release will receive two updates before the next feature release.● These releases will ship quarterly in January, April, July, and October.
– A long-term support (LTS) release every three years:● Updates for these releases will be available for at least three years.● The first LTS release has been released in September 2018.
35
Changes to the Release Model of Java SE (6)
● Thus, the overall rate of change should be about the same as before.– The six-month feature releases will be smaller than
the multi-year feature releases of the past, and therefore easier to adopt.
– Developers who prefer rapid innovation can leverage new features in production as soon as possible.
– Enterprises that prefer stability can instead use the current long-term support release.
36
Changes to the Release Model of Java SE (7)
● Oracle Java SE Support Roadmap https://www.oracle.com/technetwork/java/java-se-support-roadmap.html
37
Changes to the Release Model of Java SE (8)
● Once a new feature release is made available, any previous non-LTS release will be considered superseded.– Superseded non-LTS releases are not supported
anymore, thus, they will get no more updates.● Oracle provides updates for the LTS releases of
Oracle JDK for at least eight years.– These updates are available only for commercial
users!
38
Changes to the License of Oracle JDK (1)
● Before Java SE 11, the Oracle JDK and JRE were distributed under the BCL.– The BCL permits them to to be used and distributed together with non-free
software.– See:
● Oracle Binary Code License Agreement for the Java SE Platform Products https://www.oracle.com/technetwork/java/javase/terms/license/index.html
● Starting with Java SE 11, Oracle JDK is available free under the following license:– Oracle Technology Network License Agreement for Oracle Java SE
https://www.oracle.com/technetwork/java/javase/terms/license/javase-license.html
● Permitted uses include: personal desktop use, development and testing, demonstration, education.
39
Changes to the License of Oracle JDK (2)
● Starting with Java SE 11, commercial uses of Oracle JDK require a commercial license (Java SE Subscription/Java SE Desktop Subscription).– Subscriptions are available per user (desktop
deployments), or processor (sever and/or cloud deployments).
– See:● Oracle Java SE Subscriptions
https://www.oracle.com/java/java-se-subscription.html● Oracle Java SE Subscription FAQ
https://www.oracle.com/technetwork/java/javaseproducts/overview/javasesubscriptionfaq-4891443.html
40
Changes to the License of Oracle JDK (3)
● Oracle will continue to provide free updates to Java SE 8 for personal users until at least the end of 2020.
● Starting from 2018, commercial uses of Oracle's updates to Java SE 8 require a commercial license.
● See:– Oracle Java SE Support Roadmap
https://www.oracle.com/technetwork/java/java-se-support-roadmap.html
41
Changes to the License of Oracle JDK (4)
● The lifetime and official support of Oracle JDK until Java SE 8:
Source: Hendrik Ebbers. Do I need to pay for Java now? June 25, 2018.https://dev.karakun.com/java/2018/06/25/java-releases.html
42
Changes to the License of Oracle JDK (5)
● The lifetime and official support of Oracle JDK starting with Java SE 9:
Source: Hendrik Ebbers. Do I need to pay for Java now? June 25, 2018.https://dev.karakun.com/java/2018/06/25/java-releases.html
43
Changes to the License of Oracle JDK (6)
● The lifetime and official support of Oracle JDK starting with Java SE 11:
Source: Hendrik Ebbers. Do I need to pay for Java now? June 25, 2018.https://dev.karakun.com/java/2018/06/25/java-releases.html
44
Changes to the License of Oracle JDK (7)
● Further reading:– Stephen Colebourne. Oracle's Java 11 trap – Use
OpenJDK instead! 26 September 2018. https://blog.joda.org/2018/09/do-not-fall-into-oracles-java-11-trap.html
– Dustin Marx. JDK 11: Release Candidate Update and OpenJDK JDK 11 LTS. 21 August 2018. https://dzone.com/articles/jdk-11-release-candidate-update-and-openjdk-jdk-11
– Hendrik Ebbers. Do I need to pay for Java now? June 25, 2018. https://dev.karakun.com/java/2018/06/25/java-releases.html
45
OpenJDK Updates (1)
● JDK Updates Project https://openjdk.java.net/projects/jdk-updates/– The goal of the project is to develop updates for the
OpenJDK Project.– JDK11u: OpenJDK 11 Updates
https://wiki.openjdk.java.net/display/JDKUpdates/JDK11u
● OpenJDK 11 updates will be delivered on the same established quarterly cycle used by Oracle.
46
OpenJDK Updates (2)
● The OpenJDK itself does not have any formal concept of long-term support.
● However, (Open)JDK providers may have their own LTS release strategy.– Example:
● Azul Systems: Product Lifecycle https://www.azul.com/products/zulu-community/
● See:– Azul Systems. What Does Long-Term Support Mean for
OpenJDK? July 15th, 2019. https://www.javacodegeeks.com/2019/07/long-term-support-mean-openjdk.html
47
Java EE (1)
● Provides an API and runtime environment for developing and running multi-tiered, scalable, reliable, and secure server-side applications.
● It is built on top of the Java SE platform.● Website:
– https://www.oracle.com/java/technologies/java-ee-glance.html
– https://javaee.github.io/
48
Java EE (2)
● Its current version is Java EE 8 released on September 21, 2017.– See: Oracle Announces Java SE 9 and Java EE 8
https://www.oracle.com/corporate/pressrelease/java-se-9-and-ee-8-092117.html
● Specification:– JSR 366: Java Platform, Enterprise Edition 8 (Java EE
8) Specification https://jcp.org/en/jsr/detail?id=366● API documentation:
https://javaee.github.io/javaee-spec/javadocs/
49
Java EE (3)
● Java EE 8 reference implementation:– GlassFish Server (license: Common Development
and Distribution License v1.1/GPLv2) https://javaee.github.io/glassfish/https://github.com/javaee/glassfish
● Other Java EE implementations:– See: Java EE Compatibility
https://www.oracle.com/technetwork/java/javaee/overview/compatibility-jsp-136984.html
50
Java EE (4)
● In 2016, Oracle's commitment to Java EE was questioned by the developer community.– See: Java EE Guardians
http://web.archive.org/web/20190510105354/https://javaee-guardians.io/● In August 2017, Oracle announced that it had decided to donate Java EE to an open
source foundation.– See: Opening Up Java EE. August 17, 2017.
https://blogs.oracle.com/theaquarium/opening-up-java-ee● In September 2017, Oracle announced it was donating Java EE to the Eclipse
Foundation.– See: Opening Up Java EE – An Update. September 12, 2017.
https://blogs.oracle.com/theaquarium/opening-up-ee-update● The Eclipse project that takes over and continues the development of Java EE:
– Eclipse Enterprise for Java (EE4J) https://projects.eclipse.org/projects/ee4jhttps://github.com/eclipse-ee4j/ee4j
51
Java EE (5)
● Further recommended reading:– Reza Rahman. Java EE 8 – A Bird's Eye View.
2018. https://www.eclipse.org/community/eclipse_newsletter/2018/november/birdseyejavaee8.php
52
Jakarta EE (1)
● On February 26, 2018, it was announced that the technology formerly known as Java EE was renamed to Jakarta EE.– See: Mike Milinkovich. And the Name Is… February
26, 2018. https://eclipse-foundation.blog/2018/02/26/and-the-name-is/
● Website: https://jakarta.ee/– Specifications: https://jakarta.ee/specifications/
53
Jakarta EE (2)
● The current version is Jakarta EE 8, released on September 10, 2019.– See: The Eclipse Foundation Releases Jakarta EE 8
Specifications; Completes Transition to Eclipse Foundation as the New Home for Open Source Cloud Native Java https://jakarta.ee/news/announcements/2019/09/10/the-eclipse-foundation-releases-jakarta-ee-8-specifications-completes-transition-to-eclipse-foundation-as-the-new-home-for-open-source-cloud-native-java/
● Jakarta EE 8 is fully compatible with Java EE 8.● API documentation:
https://jakarta.ee/specifications/platform/8/apidocs/
54
Jakarta EE (3)
● Implementations:– Eclipse GlassFish (license: Eclipse Public License
2.0/GPLv2 + Classpath Exception) https://projects.eclipse.org/projects/ee4j.glassfish https://github.com/eclipse-ee4j/glassfish
– Wildfly (license: LGPLv2.1) https://wildfly.org/ https://github.com/wildfly/wildfly
– …● See: Jakarta EE Compatible Products
https://jakarta.ee/compatibility/
55
Jakarta EE (4)
● Further information:– Jakarta EE Tutorial
https://eclipse-ee4j.github.io/jakartaee-tutorial/https://github.com/eclipse-ee4j/jakartaee-tutorial
– Jakarta EE Ambassadors https://jakartaee-ambassadors.io/
– Jakarta Blogs https://jakartablogs.ee/
56
Java Community Process (JCP) (1)
● “[...] the open, participative process to develop and revise the Java technology specifications, reference implementations, and test suites introduced in 1998. The JCP program fosters the evolution of the Java platform in cooperation with the international Java developer community.”– See: The Java Community Process Program –
Introduction – FAQ https://www.jcp.org/en/introduction/faq#jcp
● Website: https://www.jcp.org/
57
Java Community Process (JCP) (2)
● The JCP is open to everyone.– Anyone (including individuals, companies, and
nonprofit organizations) can participate in the JCP at a variety of levels (observer, registered user, member).
– Any form of participation is free of charge.● See: The Java Community Process Program –
Participation https://www.jcp.org/en/participation/overview
58
Java Community Process (JCP) (3)
● Operation:– Program Management Office (PMO):
● The group within Oracle designated to oversee the Java Community Process and manage the daily running of the program.
– Executive Committee (EC):● Consists of 25 members, Oracle Corporation has a permanent seat.● Guides the evolution of Java technology in the JCP.
– For example, select specifications for development within the JCP, approves specifications.
– Expert Group (EG):● The group of JCP members who collaborate on developing a Java
specification (JSR).
59
Java Community Process (JCP) (4)
● A specification passes through the following stages, and thus can become a potential component of the Java platform:– Initiation: One or more members initiate a request to develop a new specification, or
carry out a significant revision to an existing one. If the EC approves the request, then an Expert Group is formed.
– Draft Releases: The Expert Group develops the specification, releasing drafts for public review and comment. Then the EC holds a ballot on whether the specification should proceed to the next stage.
– Final release: An RI and TCK are being developed. When these are completed, and the RI passes the TCK, the specification, the RI, and the TCK are submitted to the PMO for a final approval.
– Maintenance: The specification, RI, and TCK are updated in response to ongoing requests for clarification, interpretation, enhancements, and revisions.
● See: The Java Community Process Program – JCP Procedures – Process Document https://jcp.org/en/procedures/jcp2
60
Java Community Process (JCP) (5)
● Further recommended reading:– Simon Ritter. Keeping The Community In The Java
Community Process (JCP). November 21, 2016. https://www.sitepoint.com/keeping-community-in-java-community-process-jcp/
61
Java Specification Request (JSR) (1)
● A document submitted to the JCP by one or more members to propose the development of a new specification or significant revision to an existing specification.– JSR also refers to the specification development efforts
arising from these proposals.– See: The Java Community Process Program –
Introduction – FAQ https://www.jcp.org/en/introduction/faq#jsr
● The list of all JSRs: https://www.jcp.org/en/jsr/all
62
Java Specification Request (JSR) (2)
● Anyone with an internet connection can review and comment on JSRs.
● Only members of the JCP can participate in Expert Groups or participate on a JSR as a contributor.– Anyone can apply to become a member of the JCP,
there are no fees for JCP membership.
63
Java Specification Request (JSR) (3)
● In order to be approved a final or maintenance release of a JSR requires the following:– Reference Implementation (RI): The prototype or
“proof of concept” implementation of a specification.– Technology Compatibility Kit (TCK): The suite of
tests, tools, and documentation that is used to determine if an implementation of a JSR complies with the specification.
64
Java Specification Request (JSR) (4)
● Examples:– JSR 310: Date and Time API
https://jcp.org/en/jsr/detail?id=310– JSR 338: Java Persistence API, Version 2.2
https://jcp.org/en/jsr/detail?id=338– JSR 384: Java SE 11 (18.9)
https://jcp.org/en/jsr/detail?id=384– JSR 388: Java SE 13
https://www.jcp.org/en/jsr/detail?id=386
65
Java Specification Request (JSR) (5)
● Several options are available for licensing the specifications, including the use of free and open source licenses.– See: Spec Leads License Reference
https://jcp.org/en/resources/license_reference
66
JDK Enhancement Proposal (JEP)
● A process used by the OpenJDK project for managing the proposals for enhancements to the JDK.
● The primary goal of this process is to produce a regularly-updated list of proposals to serve as the long-term roadmap for the JDK and related efforts.– See:
● JEP 1: JDK Enhancement-Proposal & Roadmap Process http://openjdk.java.net/jeps/1
● The index of all JEPS:– JEP 0: JEP Index http://openjdk.java.net/jeps/0
● This process does not in any way supplant the Java Community Process!
67
Preview Language and VM Features (1)
● A preview language or VM feature is a new feature of the Java SE Platform that is fully specified, fully implemented, and yet impermanent.
● It is available in a JDK feature release to provoke developer feedback based on real world use; this may lead to it becoming permanent in a future Java SE Platform.
● See:– JEP 12: Preview Language and VM Features
https://openjdk.java.net/jeps/12
68
Preview Language and VM Features (2)
● Examples:– JDK 13:
● JEP 354: Switch Expressions (Preview)https://openjdk.java.net/jeps/354
● JEP 355: Text Blocks (Preview) https://openjdk.java.net/jeps/355
– JDK 14:● JEP 305: Pattern Matching for instanceof (Preview)
https://openjdk.java.net/jeps/305● JEP 359: Records (Preview) https://openjdk.java.net/jeps/359● JEP 368: Text Blocks (Second Preview)
https://openjdk.java.net/jeps/368
69
Preview Language and VM Features (3)
● The --enable-preview command line option must be passed to the command-line tools of the JDK (e.g., java, javac, jshell) in order to enable preview features.– For Apache Maven the command line option can be
specified in the .mvn/jvm.config file.● See: Configuring Apache Maven
https://maven.apache.org/configure.html#a.mvn.2Fmaven.config_file:
70
Preview Language and VM Features (4)
● Example: Text Blocks (JEP 355)
// Old-style initialization:String html = "<!DOCTYPE html>\n" + "<html lang=\"en\">\n" + " <head>\n" + " <meta charset=\"utf-8\">\n" + " <title>Hello, World!</title>\n" + " </head>\n" + " <body>\n" + " <p>Hello, World!</p>\n" + " </body>\n" + "</html>\n";
71
Preview Language and VM Features (5)
● Example: Text Blocks (JEP 355)
// New style initialization:var html = """ <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Hello, World!</title> </head> <body> <p>Hello, World!</p> </body> </html> """;
72
Related Programming Languages and Platforms
● JavaFX/OpenJFX https://openjfx.io/● Android https://www.android.com/● Apache Groovy http://groovy-lang.org/● Kotlin https://kotlinlang.org/● Scala https://www.scala-lang.org/● Clojure https://clojure.org/● JavaPoly.js https://www.javapoly.com/● GraalVM https://www.graalvm.org/
73
JavaFX (1)
● JavaFX is a platform based on Java SE for creating rich client applications that operate consistently across diverse platforms.
● Starting with Java SE 7 Update 6, JavaFX was part of Oracle's Java SE implementation.
● Website: https://www.oracle.com/technetwork/java/javase/overview/javafx-overview-2158620.html
74
JavaFX (2)
● Starting with Java SE 11, JavaFX is no longer included in the JDK, OpenJFX is intended to replace it.– See:
● Donald Smith. The Future of JavaFX and Other Java Client Roadmap Updates. March 7, 2018. https://blogs.oracle.com/java-platform-group/the-future-of-javafx-and-other-java-client-roadmap-updates
● JDK 11 Release Notes https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html
75
OpenJFX (1)
● “Is an open source, next generation client application platform for desktop, mobile and embedded systems built on Java.”
● Is part of the OpenJDK project.● Website:
https://wiki.openjdk.java.net/display/OpenJFX/https://openjfx.io/https://github.com/openjdk/jfx
76
OpenJFX (2)
● Platform: Linux, macOS, Windows, embedded devices (e.g., Raspberry Pi)
● License: GPLv2 + Classpath Exception https://openjdk.java.net/legal/gplv2+ce.html
● Current version: JavaFX 13 (requires JDK 11 or later)
● Documentation: https://openjfx.io/openjfx-docs/– API documentation: https://openjfx.io/javadoc/11/
77
OpenJFX (3)
● The company Gluon provides commercial support for JavaFX. https://gluonhq.com/
● Developer tools:– Free and open source:
● e(fx)clipse (platform: Eclipse; license: Eclipse Public License 1.0) http://www.eclipse.org/efxclipse
● Gluon Scene Builder (operating system: Linux, macOS, Windows; licenc: New BSD License) https://gluonhq.com/products/scene-builder/ https://github.com/gluonhq/scenebuilder
78
Android
● A mobile operating system and software platform developed by Google that is based upon the Linux kernel.
● Architecture: Platform Architecture https://developer.android.com/guide/platform/
● Android applications can be written in C++, Java, and Kotlin.– See: Application Fundamentals
https://developer.android.com/guide/components/fundamentals.html● Applications are compiled into Dalvik bytecode (.dex files) and then
further compiled into native code by the Android Runtime (ART).– See: ART and Dalvik https://source.android.com/devices/tech/dalvik
● License: Apache License 2.0● Website: https://www.android.com/
79
Apache Groovy (1)
● An object-oriented programming language for the Java platform.– Is optionally typed and dynamic, with static-typing
and static compilation capabilities.● Supports scripting, Domain-Specific Language
authoring, runtime and compile-time meta-programming and functional programming.
80
Apache Groovy (2)
● Differences with Javahttp://groovy-lang.org/differences.html
● Specification: http://groovy-lang.org/documentation.html
● License: Apache License 2.0● Website: http://groovy-lang.org/
https://github.com/apache/groovy
81
Apache Groovy (3)
● “Hello, world!” program:
println "Hello, world!"
82
Apache Groovy (4)
● Software written in Groovy:– Gradle (license: Apache License 2.0) https://gradle.org/
https://github.com/gradle/gradle– Grails (license: Apache License 2.0) https://grails.org/
https://github.com/grails– …– See more:
● http://groovysource.com/● https://github.com/kdabir/awesome-groovy● https://github.com/trending/groovy
83
Kotlin (1)
● A general purpose, statically typed programming language that supports the object-oriented and functional paradigms.
● Can be used for server-side, client-side web, and Android development.– An official language for the Android platform.
● See: Kotlin on Android FAQ https://developer.android.com/kotlin/faq.html
● It is designed to be interoperable with Java.– Java code can be called from Kotlin, and vice versa, see:
● Calling Java code from Kotlin https://kotlinlang.org/docs/reference/java-interop.html
● Calling Kotlin from Java https://kotlinlang.org/docs/reference/java-to-kotlin-interop.html
84
Kotlin (2)
● Kotlin code can be compiled into Java bytecode or JavaScript.
● Kotlin/Native:– A technology for compiling Kotlin code to native
code.– See: https://github.com/JetBrains/kotlin-native
https://kotlinlang.org/docs/reference/native-overview.html
85
Kotlin (3)
● Comparison to the Java programming language:– See: https://kotlinlang.org/docs/reference/comparison-to-java.html– Compared to Java, it has a more concise syntax. Rough estimates
indicate approximately a 40% cut in the number of lines of code.● See: Kotlin FAQ https://kotlinlang.org/docs/reference/faq.html
● Specification: Kotlin Language Specification https://kotlin.github.io/kotlin-spec/
● License: Apache License 2.0● Website: https://kotlinlang.org/
https://github.com/JetBrains/kotlin/
86
Kotlin (4)
● “Hello, world!” program:– See:
https://try.kotlinlang.org/#/Examples/Hello,%20world!/Simplest%20version/Simplest%20version.kt
fun main(args: Array<String>) { println("Hello, world!")}
87
Kotlin (5)
● Software written in Kotlin:– Android Studio (license: proprietary) https://developer.android.com/studio– Gradle (license: Apache License 2.0) https://gradle.org/
https://github.com/gradle/gradle– IntelliJ IDEA (license: Apache License 2.0/proprietary)
https://www.jetbrains.com/idea/ https://github.com/JetBrains/intellij-community– Kotlin (license: Apache License 2.0) https://kotlinlang.org/
https://github.com/JetBrains/kotlin– …– See more:
● https://kotlin.link/● https://github.com/trending/kotlin
88
Scala (1)
● A Java-like and statically typed programming language which unifies object-oriented and functional programming.
● It has been designed to interoperate seamlessly with Java.– Scala classes can call Java methods, create Java objects,
inherit from Java classes and implement Java interfaces.● Scala code is compiled into Java bytecode.● See: Tour of Scala
https://docs.scala-lang.org/tour/tour-of-scala.html
89
Scala (2)
● Specification: Scala Language Specification https://www.scala-lang.org/files/archive/spec/2.13/
● License: New BSD License● Website: http://scala-lang.org/
https://github.com/scala/scala
90
Scala (3)
● “Hello, world!” program:– See: Your first lines of code
https://scala-lang.org/documentation/your-first-lines-of-scala.html
object HelloWorld {def main(args: Array[String]): Unit = {
println("Hello, world!")}
}
91
Scala (4)
● Software written in Scala:– Apache Kafka (license: Apache License 2.0) https://kafka.apache.org/
https://github.com/apache/kafka– Apache Spark (license: Apache License 2.0)
https://spark.apache.org/ https://github.com/apache/spark– Eclipse Deeplearning4j (license: Apache License 2.0)
https://deeplearning4j.org/ https://github.com/eclipse/deeplearning4j– Play Framework (license: Apache License 2.0)
https://www.playframework.com/ https://github.com/playframework/playframework
– …– See more: https://github.com/trending/scala
92
Clojure (1)
● A dynamic and general-purpose functional programming language.
● A dialect of Lisp that is compiled to Java bytecode.
● Rationale: https://clojure.org/about/rationale
93
Clojure (2)
● Specification: -● Documentation:
https://clojure.org/reference/documentation● License: Eclipse Public License 1.0● Website: https://clojure.org/
https://github.com/clojure/clojure/
94
Clojure (3)
● Related projects:– Leiningen (written in: Clojure; license: Eclipse
Public License 1.0) https://leiningen.org/https://github.com/technomancy/leiningen
● A build tool for Clojure.
– ClojureScript (written in: Clojure; license: Eclipse Public License 1.0)
● A Clojure-to-JavaScript compiler.
95
Clojure (4)
● “Hello, World!” program:
(ns hello.core)
(defn -main [& args] (println "Hello, World!"))
96
Clojure (5)
● Software written in Clojure:– Light Table (license: MIT License) http://lighttable.com/
https://github.com/LightTable/LightTable– Metabase (license: AGPLv3) https://www.metabase.com/
https://github.com/metabase/metabase– …
See more:● https://clojure.org/community/success_stories● http://open-source.braveclojure.com/● https://github.com/trending/clojure
97
JavaPoly.js (1)
● A Javascript library that polyfills native JVM support in web browsers.– Thus, it allows the execution of Java code directly in a web browser, even if
a JDK or JRE is not installed on the computer!● Polyfill: a piece of code (or plugin) that provides a functionality in web
browsers that do not support it natively.– See:
● Polyfill https://developer.mozilla.org/en-US/docs/Glossary/Polyfill● Remy Sharp. What is a Polyfill? October 8, 2010.
https://remysharp.com/2010/10/08/what-is-a-polyfill
● License: New BSD License● Website: https://www.javapoly.com/
https://github.com/jdstroy/JavaPoly
98
JavaPoly.js (2)
● Implementation:– See: JavaPoly.js – Technical Details
https://www.javapoly.com/details.html– Utilizes Doppio JVM, a JVM written in TypeScript.
● Website: http://plasma-umass.github.io/doppio-demo/https://github.com/plasma-umass/doppio
99
GraalVM (1)
● A universal virtual machine for running applications written in:– JVM-based languages such as Java, Scala, Kotlin, and Clojure.– JavaScript– Python (early-stage experimental)– Ruby (experimental)– R (experimental)– LLVM-based languages such as C and C++.
● Enables the development of polyglot applications that mix different languages within one program with zero overhead.– Languages can access each other’s data structures and call each other’s methods.
● A standalone JDK, the current release is based on Oracle JDK 8/OpenJDK 8 and Oracle JDK 11/OpenJDK 11.
● Website: https://www.graalvm.org/ https://github.com/oracle/graal
100
GraalVM (2)
● Platform: Linux, macOS, Windows (experimental)
● Editions:– Community Edition (CE)
● License: GPLv2
– Enterprise Edition (EE)● Free for evaluation and other non-production uses.
● Documentation: https://www.graalvm.org/docs/
101
SDKMAN!
● A tool for managing parallel versions of various software development kits (SDKs).– It enables users to install and manage SKDs without requiring
system administrator privileges.● Platform: Unix-like● License: Apache License 2.0● Website: https://sdkman.io/
https://github.com/sdkman/sdkman-cli● Available SDK-k: https://sdkman.io/jdks
https://sdkman.io/sdks
102
Integrated Development Environments (1)
● Free and open source software:– Apache NetBeans (platform: JDK 8, 11, and 13; license: Apache
License 2.0) https://netbeans.org/– Eclipse IDE for Java Developers (platform: Linux, macOS,
Windows; license: Eclipse Public License 2.0) https://www.eclipse.org/
– Visual Studio Code (platform: Linux, macOS, Windows; license: MIT License) https://code.visualstudio.com/ https://github.com/Microsoft/vscode
● See:– Java in Visual Studio Code https://code.visualstudio.com/docs/languages/java– Java Extension Pack
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack
103
Integrated Development Environments (2)
● Non-free software:– IntelliJ IDEA (platform: Linux, macOS, Windows;
license: proprietary) https://www.jetbrains.com/idea/● Free educational licenses:
https://www.jetbrains.com/community/education/
104
Further Recommended Reading
● Java 2019 – The state of Developer Ecosystem in 2019 Infographic https://www.jetbrains.com/lp/devecosystem-2019/java/
● JVM Ecosystem Report 2018. October 17, 2018. https://snyk.io/blog/jvm-ecosystem-report-2018/
● Eugen Paraschiv. The State of Java in 2018. November 6, 2018. https://www.baeldung.com/java-in-2018