Technology Overview

Péter Jeszenszky Faculty of Informatics, University of Debrecen [email protected]

Last modified: February 14, 2021 Terminology

● Java (programming language) ● (JVM) ● Java Platform ● Java Platform, Standard Edition (Java SE) ● Java Platform, Enterprise Edition (Java EE) ● Java Runtime Environment (JRE) ● (JDK) ● OpenJDK ● (JCP) ● Java Specification Request (JSR) ● JDK Enhancement Proposal (JEP)

2 Java (Programming Language) (1)

● The language was developed at in the 90s. The company was acquired by Oracle in 2009. – The father of the language: http://nighthacks.com/jag/blog/400/ ● Website: https://www.oracle.com/java/

3 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

4 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/

5 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

6 Java (Programming Language) (5)

● The latest version is Java 15. ● Language specification: – James Gosling, , Guy Steele, , Alex Buckley, Daniel Smith. The Java Language Specification, Java SE 15 Edition. September 2020. https://docs.oracle.com/javase/specs/

7 Java (Programming Language) (6)

● According to the Tiobe Index, it is currently the second most popular programming language after C. – See: ● TIOBE Index https://www.tiobe.com/tiobe-index/ ● TIOBE Programming Community Index Definition https://www.tiobe.com/tiobe-index/programming-languages-defi nition/ ● See also: – PYPL PopularitY of Programming Language https://pypl.github.io/PYPL.html

8 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 -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/

9 Java Virtual Machine (2)

● Free and open source implementations: – HotSpot (operating system: cross-platform; license: GPLv2) https://openjdk.java.net/groups/hotspot/ ● The virtual machine of OpenJDK. – OpenJ9 (operating system: AIX, , 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/

10 Java Platform (1)

● A platform is the hardware or software environment in which a program runs. – Examples: an , 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

11 Java Platform (2)

● Java platforms: – https://www.oracle.com/java/technologies/java-card- tech.html – Java Platform, Enterprise Edition (Java EE) https://www.oracle.com/java/technologies/java-ee-gl ance.html – Java Platform, Micro Edition (Java ME) https://www.oracle.com/java/technologies/javameov erview.html – Java Platform, Standard Edition (Java SE) https://www.oracle.com/java/technologies/java-se-gl ance.html 12 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: https://www.oracle.com/java/technologies/java-s e-glance.html

13 Java SE (2)

● The latest LTS version is Java SE 11 (18.9) 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

14 Java SE (3)

● Its current version is Java SE 15 released on September 15, 2020. – See: Oracle Announces Java 15 https://www.oracle.com/news/announcement/oracle-announces-java -15-091520.html ● Specification: – JSR 390: Java SE 15 https://www.jcp.org/en/jsr/detail?id=390 ● Documentation: https://docs.oracle.com/en/java/javase/15/ – Migration: Oracle JDK Migration Guide, Release 15 https://docs.oracle.com/en/java/javase/15/migrate/ – API documentation: https://docs.oracle.com/en/java/javase/15/docs/api/

15 Java SE (4)

● The next version is Java SE 16 implemented by JDK 16. – JDK 16 will be released on March 16, 2021. ● See: https://openjdk.java.net/projects/jdk/16/ ● Specification: – JSR 391: Java SE 16 https://www.jcp.org/en/jsr/detail?id=391 ● API documentation: https://download.java.net/java/early_access/jdk16 /docs/api/

16 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!

17 Java SE (6)

Source: Java Platform Standard Edition 8 Documentation https://docs.oracle.com/javase/8/docs/ 18 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 + Exception) https://openjdk.java.net/ https://github.com/openjdk/jdk – Oracle JRE (operating system: Linux, macOS, Solaris SPARC, Windows; license: Oracle Technology Network License Agreement for Oracle Java SE) https://www.oracle.com/java/technologies/javase-jre8-downloa ds.html

19 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/understandin g-the-server-jre ● Server JRE (Java SE Runtime Environment) 8 Downloads https://www.oracle.com/java/technologies/javase-server-jr e8-downloads.html

20 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/

21 Java Development Kit (JDK) (2)

● Non-free implementations: – Oracle JDK (operating system: Linux, macOS, Solaris SPARC, Windows) https://www.oracle.com/technetwork/java/javase/do wnloads/index.html ● License: Oracle Technology Network License Agreement for Oracle Java SE https://www.oracle.com/downloads/licenses/javase-licens e1.html – Zulu Enterprise (operating system: Linux, macOS, Solaris, Windows) https://www.azul.com/products/zulu-enterprise/

22 Java Development Kit (JDK) (3)

● Free and open source implementations: – OpenJDK (operating system: Linux, macOS, Windows; license: GPLv2 + Classpath Exception) https://openjdk.java.net/ – Oracle OpenJDK (operating system: Linux, macOS, Windows; license: GPLv2 + Classpath Exception) https://jdk.java.net/ – AdoptOpenJDK (operating system: Linux, macOS, Windows, AIX, Solaris; license: GPLv2 + Classpath Exception) https://adoptopenjdk.net/ – 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/

23 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-or acles-jdk.html

24 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 https://openjdk.java.net/bylaws ● Website: https://openjdk.java.net/

25 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 of the Java HotSpot virtual machine and the Java () under the GPLv2 on November 13, 2006. – See: Sun Opens Java https://web.archive.org/web/20070517164922/http://www.sun.com:80/2006-111 3/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) https://mail.openjdk.java.net/pipermail/announce/2007-May/000000.html ● OpenJDK https://web.archive.org/web/20070510033950/http://openjdk.java.net:80/

26 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 https://jdk.java.net/java-se-ri/7 – Java SE 8 Reference Implementations https://jdk.java.net/java-se-ri/8 – … – Java SE 15 Reference Implementations https://jdk.java.net/java-se-ri/15

27 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/javacom ponents/index.html – Example: JDK Mission Control (jmc) https://www.oracle.com/java/technologies/jdk-mission-control.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. https://mail.openjdk.java.net/pipermail/discuss/2017-September/004281.html

28 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-rele ases-for-java-11-and-later

29 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. https://mail.openjdk.java.net/pipermail/discuss/2017-S eptember/004281.html – Donald Smith. Faster and Easier Use and Redistribution of Java SE. September 6, 2017. https://blogs.oracle.com/java-platform-group/faster-an d-easier-use-and-redistribution-of-java-se 30 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 31 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.

32 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.

33 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 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.

34 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.

35 Changes to the Release Model of Java SE (7)

● Oracle Java SE Support Roadmap https://www.oracle.com/technetwork/java/java-s e-support-roadmap.html

36 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!

37 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-. – See: ● Oracle Binary Code License Agreement for the Java SE Platform Products https://www.oracle.com/downloads/licenses/binary-code-license.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/downloads/licenses/javase-license1.html ● Permitted uses include: personal desktop use, development and testing, demonstration, education.

38 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/java/technologies/java-se-subscription-faq .html

39 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-sup port-roadmap.html

40 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 41 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. 42 https://dev.karakun.com/java/2018/06/25/java-releases.html Changes to the License of Oracle JDK (6)

● The lifetime and official support of Oracle JDK starting with Java SE 11:

43 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 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-j ava-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-u pdate-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-release s.html 44 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/JD K11u ● OpenJDK 11 updates will be delivered on the same established quarterly cycle used by Oracle.

45 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: ● AdoptOpenJDK: Support https://adoptopenjdk.net/support.html ● Amazon Corretto: Amazon Corretto FAQs https://aws.amazon.com/corretto/faqs/ ● See: – . What Does Long-Term Support Mean for OpenJDK? July 15, 2019. https://www.javacodegeeks.com/2019/07/long-term-support-mean-ope njdk.html

46 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-gl ance.html – https://javaee.github.io/

47 Java EE (2)

● Its last 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-s e-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/

48 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/java/technologies/compatibi lity-jsp.html

49 Java EE (4)

● In 2016, Oracle's commitment to Java EE was questioned by the developer community. – See: Java EE Guardians https://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/ee4j https://github.com/eclipse-ee4j/ee4j

50 Java EE (5)

● Further recommended reading: – Reza Rahman. Java EE 8 – A Bird's Eye View. 2018. https://www.eclipse.org/community/eclipse_newslett er/2018/november/birdseyejavaee8.php

51 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/

52 Jakarta EE (2)

● The current version is Jakarta EE 9, released on December 8, 2020. – See: Jakarta EE 9 Delivers the Big Bang https://eclipse-foundation.blog/2020/12/08/jakarta-e e-9-delivers-the-big-bang/ ● It is not backwards-compatible with Jakarta EE 8 or Java EE 8. ● API documentation: https://jakarta.ee/specifications/platform/9/apido cs/

53 Jakarta EE (3)

● Implementations: – Eclipse GlassFish (license: Eclipse Public License 2.0/ GPLv2 + Classpath Exception) https://glassfish.org/ 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/

54 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/

55 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/

56 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

57 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, 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).

58 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

59 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-jav a-community-process-jcp/

60 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

61 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.

62 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.

63 Java Specification Request (JSR) (4)

● Examples: – JSR 376: Java Platform Module System https://jcp.org/en/jsr/detail?id=376 – JSR 385: Units of Measurement API 2.0 https://jcp.org/en/jsr/detail?id=385 – JSR 390: Java SE 15 https://jcp.org/en/jsr/detail?id=390 – JSR 391: Java SE 16 https://jcp.org/en/jsr/detail?id=391 – JSR 392: Java SE 17 https://jcp.org/en/jsr/detail?id=392

64 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

65 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 https://openjdk.java.net/jeps/1 ● The index of all JEPS: – JEP 0: JEP Index https://openjdk.java.net/jeps/0 ● This process does not in any way supplant the Java Community Process!

66 Preview Features (1)

● A preview feature is a new feature of the Java language, Java Virtual Machine, or Java SE API 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 Features https://openjdk.java.net/jeps/12

67 Preview 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 – JDK 15: ● JEP 360: Sealed Classes (Preview) https://openjdk.java.net/jeps/360 ● JEP 375: Pattern Matching for instanceof (Second Preview) https://openjdk.java.net/jeps/375 ● JEP 384: Records (Second Preview) https://openjdk.java.net/jeps/384

68 Preview 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. – See: Java Language Updates – Preview Features https://docs.oracle.com/en/java/javase/15/language/ preview-language-and-vm-features.html

69 Preview Features (4)

● Apache Maven: – For compilation, the --enable-preview command line option can be passed to the Maven Compiler Plugin as follows:

org.apache.maven.plugins maven-compiler-plugin 3.8.1 --enable-preview

70 Preview Features (5)

● Apache Maven: – For running programs with the Exec Maven Plugin, the --enable-preview command line option can be specified in the .mvn/jvm.config file. ● See: Configuring Apache Maven – .mvn/jvm.config file https://maven.apache.org/configure.html#a.mvn.2Fmave n.config_file:

71 Preview Features (6)

● Example: Text Blocks (JEP 355, JEP 368)

// Old-style initialization: String html = "\n" + "\n" + " \n" + " \n" + " Hello, World!\n" + " \n" + " \n" + "

Hello, World!

\n" + " \n" + "\n";

72 Preview Features (7)

● Example: Text Blocks (JEP 355, JEP 368)

// New style initialization: var html = """ Hello, World!

Hello, World!

"""; 73 Preview Features (8)

● Example: Text Blocks (JEP 355, JEP 368) – Text blocks have become final in Java SE 15/JDK 15 with no further changes (JEP 378).

74 Preview Features (9)

● Example: Records (JEP 384) – A new type of class wrapping immutable data. – Record instances represent a fixed set of values, called the record components. – Record classes are subclasses of java.lang.Record. ● See: https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/lan g/Record.html – For each component, a record class has an implicitly declared accessor. Also, a record class has an implicitly declared constructor, equals(), hashCode(), and toString() method.

75 Preview Features (10)

● Example: Records (JEP 384)

import java.time.Year;

record LegoSet(String number, Year year, int pieces) {}

var legoSet = new LegoSet("75211", Year.of(2018), 519);

System.out.println(legoSet.number()); // 75211 System.out.println(legoSet.year()); // 2018 System.out.println(legoSet.pieces()); // 519 System.out.println(legoSet); // LegoSet[number=75211, year=2018, pieces=519]

76 Preview Features (11)

● Example: Records (JEP 384)

import java.time.Year;

record LegoSet(String number, Year year, int pieces) {

LegoSet { // Compact canonical constructor if (! number.matches("\\d{3,7}")) { throw new IllegalArgumentException("invalid number: " + number); } if (pieces < 0) { throw new IllegalArgumentException("pieces must be non-negative"); } }

}

77 Related Programming Languages and Platforms

● JavaFX/OpenJFX https://openjfx.io/ ● Android https://www.android.com/ ● https://groovy-lang.org/ ● Kotlin https://kotlinlang.org/ ● Scala https://www.scala-lang.org/ ● https://clojure.org/ ● GraalVM https://www.graalvm.org/

78 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. ● Documentation: https://docs.oracle.com/javase/8/javase-clientte chnologies.htm

79 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/java/technologies/javase/jdk-11-r elnote.html

80 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

81 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 15 (requires JDK 11 or later) ● Documentation: https://openjfx.io/openjfx-docs/ – API documentation: https://openjfx.io/javadoc/15/

82 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) https://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

83 Android

● A and software platform developed by 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 bytecode (.dex files) and then further compiled into native code by the (ART). – See: ART and Dalvik https://source.android.com/devices/tech/dalvik ● License: Apache License 2.0 ● Website: https://www.android.com/

84 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.

85 Apache Groovy (2)

● Differences with Java https://groovy-lang.org/differences.html ● Specification: https://groovy-lang.org/documentation.html ● License: Apache License 2.0 ● Website: https://groovy-lang.org/ https://github.com/apache/groovy

86 Apache Groovy (3)

● “Hello, world!” program:

println "Hello, world!"

87 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: ● https://groovysource.com/ ● https://github.com/kdabir/awesome-groovy ● https://github.com/trending/groovy

88 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

89 Kotlin (2)

● Kotlin code can be compiled into 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

90 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/

91 Kotlin (4)

● “Hello, world!” program: – See: https://try.kotlinlang.org/#/Examples/Hello,%20world !/Simplest%20version/Simplest%20version.kt

fun main(args: Array) { println("Hello, world!") }

92 Kotlin (5)

● Software written in Kotlin: – (license: proprietary) https://developer.android.com/studio – 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

93 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

94 Scala (2)

● Specification: Scala Language Specification https://www.scala-lang.org/files/archive/spec/2. 13/ ● License: New BSD License ● Website: https://www.scala-lang.org/ https://github.com/scala/scala

95 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!") } }

96 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 – Play Framework (license: Apache License 2.0) https://www.playframework.com/ https://github.com/playframework/playframework – sbt (license: Apache License 2.0) https://www.scala-sbt.org/ https://github.com/sbt/sbt – … – See more: https://github.com/trending/scala

97 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

98 Clojure (2)

● Specification: - ● Documentation: https://clojure.org/reference/documentation ● License: Eclipse Public License 1.0 ● Website: https://clojure.org/ https://github.com/clojure/clojure/

99 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) https://clojurescript.org/ https://github.com/clojure/clojurescript ● A Clojure-to-JavaScript compiler.

100 Clojure (4)

● “Hello, World!” program:

(ns hello.core)

(defn -main [& args] (println "Hello, World!"))

101 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

102 GraalVM (1)

● A universal virtual machine for running applications written in: – JVM-based languages such as Java, Scala, Kotlin, and Clojure. – LLVM-based languages such as C and C++ – JavaScript – Python (early-stage experimental) – Ruby – R (experimental) ● 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

103 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/

104 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

105 Integrated Development Environments (1)

● Free and open source software: – Apache NetBeans (platform: JDK 8, 11, and 15; license: Apache License 2.0) https://netbeans.apache.org/ – Eclipse IDE for Java Developers (platform: Linux, macOS, Windows; license: Eclipse Public License 2.0) https://www.eclipse.org/ – IntelliJ IDEA Community Edition (platform: Linux, macOS, Windows; licenc: Apache License 2.0) https://www.jetbrains.com/idea/ https://github.com/JetBrains/intellij-community – 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

106 Integrated Development Environments (2)

● Non-free software: – IntelliJ IDEA Ultimate Edition (platform: Linux, macOS, Windows; license: proprietary) https://www.jetbrains.com/idea/ ● Free educational licenses: https://www.jetbrains.com/community/education/

107 Further Recommended Reading

● Java Programming – The State of Developer Ecosystem in 2020 Infographic https://www.jetbrains.com/lp/devecosystem-202 0/java/ ● JVM Ecosystem Report 2020. February 5, 2020. https://snyk.io/blog/jvm-ecosystem-report-2020/

108