Java Development Kit – Devstyler.io https://devstyler.io News for developers from tech to lifestyle Wed, 22 Mar 2023 08:39:45 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 Oracle Launches Java 20, Which Comes With Many Improvements https://devstyler.io/blog/2023/03/22/oracle-launches-java-20-which-comes-with-many-improvements/ Wed, 22 Mar 2023 08:39:45 +0000 https://devstyler.io/?p=103414 ...]]> Oracle has released Java 20, the latest version of its programming language and development platform.

“The innovative new enhancements in Java 20 reflect the vision and invaluable efforts the global Java community has contributed throughout Java’s existence. With the support provided by Oracle’s ongoing Java technology leadership and community stewardship, Java has never been more relevant as a contemporary language and platform that helps developers improve productivity.”

said Georges Saab, SVP of development, Java Platform and chair, OpenJDK Governing Board, Oracle.

Java 20 (Oracle JDK 20) delivers thousands of performance, stability and security improvements, including platform enhancements that will help developers increase productivity and drive innovation and growth in their organizations.

The latest Java Development Kit (JDK) provides updates and enhancements with seven JDK Enhancement Proposals (JEPs). The majority of the updates are follow-on features improving functionality introduced in earlier releases.

JDK 20 delivers language improvements from OpenJDK project Amber (Record Patterns and Pattern Matching for Switch); enhancements from OpenJDK Project Panama to interconnect Java Virtual Machine (JVM) and native code (Foreign Function & Memory API and Vector API). And features related to Project Loom (Scoped Values, Virtual Threads, and Structured Concurrency), which will dramatically streamline the process of writing, maintaining, and observing high-throughput, concurrent applications.

In addition to the new enhancements, Java 20 is supported by Java Management Service – a native service of Oracle Cloud Infrastructure (OCI) – which provides a single pane of glass to help organizations manage Java runtimes and applications on-premises or in any cloud.

]]>
Java port eyed for RISC-V Hardware https://devstyler.io/blog/2021/10/01/java-port-eyed-for-risc-v-hardware/ Fri, 01 Oct 2021 07:58:56 +0000 https://devstyler.io/?p=72454 ...]]> The RISC-V hardware instruction set would get a full-featured port of open-source Java, under a proposal being discussed in the OpenJDK community this week.

If the project is approved, the port might be ready for Java Development Kit (JDK) 18, which is expected to arrive in September. Plans presently call for supporting Java on Linux on RISC-V; the base RV64G ISA (instruction set architecture) would be supported, along with vector operations.

Contributors to the project include Huawei, Alibaba, and Red Hat. The proposal states Huawei already has a complete RISC-V port based on a snapshot of the OpenJDK mainline from May 2021. Huawei’s port has passed some JTReg tests and should be good enough to run most Java programs, according to the proposal. Support for vector operations is still experimental, with more testing needed. Source code would be rebased to the latest JDK mainline before integration into the JDK mainline.

RISC-V is an open-source licensed, royalty-free instruction set architecture for computing platforms ranging from embedded systems to enterprise servers. It leverages 47 base instructions, with users able to modularly add extensions for their specific designs. Participants in the RISC-V project have included companies such as Google, Nvidia, Rambus, and Samsung.

]]>
Everything You Need to Know About OpenJDK’s move to Git and GitHub https://devstyler.io/blog/2021/05/27/everything-you-need-to-know-about-openjdk-s-move-to-git-and-github/ Thu, 27 May 2021 12:07:14 +0000 https://devstyler.io/?p=52439 ...]]> Have you ever built your own Java Development Kit from a source?

Having the complete source code readily available, and now in a more commonly used download format, means it is easier than ever to build your own JDK. Yes, it’s a better-documented, easily configured process than in the past. But it’s still a bit confusing.

The source code for the OpenJDK recently moved from the Mercurial version control system (VCS) to the Git VCS and the GitHub repository system, and that’s probably a good thing.

In his latest article, Ian Darwin (Java Champion, the author of Java Cookbook and Android Cookbook) has explained all background information, why it matters, and what you need to know.

He covered different aspects of BitKeeper– a commercial software product by McVoy’s company, BitMover; Mercurial – one of its largest projects was Sun’s Java OpenJDK; Git and Github- Git offers branching, letting developers work on multiple sets of changes at the same time, and merging, pulling multiple branches into another branch, typically the main one. A related platform is GitHub, a cloud-based Git service with plenty of additions; etc.

One of the main questions which Ian pointed out was “Why the move, and why now?”.

Well, before the move from Mercurial, the OpenJDK lived in several repositories. It was decided that it would be best to consolidate into a single repository. Ian looked at a list of completed JEPs and project documents that provide insight into the four major stages of the GitHub consolidation and migration. In the end, he showed the audience how to Get the source code and build the OpenJDK.

The OpenJDK project has moved from Mercurial on java.net to Git on GitHub. Along the way, the eight repositories that were once needed to build the JDK were merged into one. This gives you the source code to build a complete instance of Java SE.

]]>
Oracle Announced Java 16 Full of Enhancements https://devstyler.io/blog/2021/03/22/oracle-announced-java-16-full-of-enhancements/ Mon, 22 Mar 2021 19:53:16 +0000 https://devstyler.io/?p=45606 ...]]> Java remains among the most successful development platforms ever, based on continuous innovation to address the evolving needs of modern application developers. New release delivers 17 enhancements, including new Java language improvements, tools, memory management, and incubating and preview features. Additionally, Pattern Matching and Records are finalized in JDK 16 after a year of community feedback based on real-world applications. Oracle also adds GraalVM Enterprise to Java SE Subscription, at no additional cost.

Oracle announced the availability of Java 16 (Oracle JDK 16), including 17 new enhancements to the platform that will further improve developer productivity. The latest Java Development Kit (JDK) finalized Pattern Matching for instanceof (JEP 394) and Records (JEP 395), language enhancements that were first previewed in Java 14.

Additionally, developers can use the new Packaging Tool (JEP 392) to ship self-contained Java applications, as well as explore three incubating features, the Vector API (JEP 338), the Foreign Linker API (JEP 389), and the Foreign-Memory Access API (JEP 389), and one preview feature, Sealed Classes (JEP 397).

Oracle delivers Java updates every six months to provide developers with a predictable release schedule. This offers a steady stream of innovations while also delivering continued performance, stability and security improvements, increasing Java’s pervasiveness across organizations and industries of all sizes.

“The power of the six-month release cadence was on full display with the latest release,” Georges Saab, vice president of development, Java Platform Group, Oracle. “Pattern Matching and Records were introduced a year ago as part of JDK 14 and have since gone through multiple rounds of community feedback based on real-world applications. This process has not only given Java developers the opportunity to experiment with these features before they were finalized, but also incorporated that critical feedback which has resulted in two rock-solid JEPs that truly meet the needs of the community.”

The Java 16 release is the result of industry-wide development involving open review, weekly builds and extensive collaboration between Oracle engineers and members of the worldwide Java developer community via the OpenJDK Community and the Java Community Process.

The new features delivered in Java 16 are:

Language Enhancements First Introduced in JDK 14, Finalized in JDK 16

  • JEP 394: Pattern Matching for instanceof – Enhances the Java programming language with pattern matching for the instanceof operator.
  • JEP 395: Records – Enhances the Java programming language with records, which are classes that act as transparent carriers for immutable data. Records can be thought of as nominal tuples.

New Tool to Improve Developer Productivity

  • JEP 392: Packaging Tool – Provides the jpackage tool, for packaging self-contained Java applications.

Improved Memory Management to Improve Performance

  • JEP 387: Elastic Metaspace – Returns unused HotSpot class-metadata (i.e., metaspace) memory to the operating system more promptly, reduces metaspace footprint, and simplifies the metaspace code in order to reduce maintenance costs.
  • JEP 376: ZGC: Concurrent Thread-Stack Processing – Moves ZGC thread-stack processing from safepoints to a concurrent phase. This work eliminates the last significant bottleneck for allowing concurrent stack processing.

Improved Networking to Improve Developer Productivity and Flexibility

  • JEP 380: UNIX-Domain Socket Channels – Adds support for all of the features of UNIX-domain sockets that are common across the major UNIX platforms and Windows to the socket channel and server-socket channel APIs in the java.nio.channels package. UNIX-domain sockets are used for inter-process communication (IPC) on the same host. They are similar to TCP/IP sockets in most respects, except they are addressed by filesystem path names rather than Internet Protocol (IP) addresses and port numbers.

Addressing Future-incompatible Code

  • JEP 396: Strongly Encapsulate JDK Internals by Default – In JDK 9 we strongly encapsulated new internal API elements, thereby limiting access to them. As an aid to migration, however, JDK 9 deliberately chose not to strongly encapsulate at run time the content of packages that existed in JDK 8. JDK 16 tightens this constraint by encapsulating most internal elements of the JDK by default, except for critical internal APIs such as sun.misc.Unsafe. End users can still choose the relaxed strong encapsulation that has been the default since JDK 9. This will encourage developers to migrate from using internal elements to using standard APIs, so that both they and their users can upgrade without fuss to future Java releases.
  • JEP 390: Warnings for Value-Based Classes – Designates the primitive wrapper classes as value-based and deprecate their constructors for removal, prompting new deprecation warnings. Provides warnings about improper attempts to synchronize on instances of any value-based classes in the Java Platform.

Incubating and Preview Features

  • JEP 338: Vector API (Incubator) – Provides an initial iteration of an incubator module, jdk.incubator.vector, to express vector computations that reliably compile at runtime to optimal vector hardware instructions on supported CPU architectures.
  • JEP 389: Foreign Linker API (Incubator) – Introduces an API that offers statically-typed, pure-Java access to native code.
  • JEP 393: Foreign-Memory Access API (Third Incubator) – Introduces an API to allow Java programs to safely and efficiently access foreign memory outside of the Java heap.
  • JEP 397: Sealed Classes (Second Preview) – Enhances the Java programming language with sealed classes and interfaces. Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them.

Improvements for OpenJDK Contributors

New Ports Provide Support for Java on More Platforms

  • JEP 386: Alpine Linux Port – Ports the JDK to Alpine Linux, and to other Linux distributions that use musl as their primary C library, on both the x64 and AArch64 architectures.
  • JEP 388: Windows/Aarch64 Port – Ports the JDK to Windows/AArch64.

GraalVM Enterprise

Java remains among the most successful development platforms ever, based on continuous innovation to address the evolving needs of modern application developers. To make the Oracle Java SE Subscription even more valuable to customers, Oracle added GraalVM Enterprise as an entitlement. GraalVM can help improve performance and reduce resource consumption by applications, especially in microservices and cloud-native architectures. Organizations that manage their Java estates by leveraging the Oracle Java SE subscription not only benefit from having the latest enhancements and direct access to Java experts at Oracle, but experience substantial savings over other approaches.

“Instead of getting interested every three or four years about what was new in Java, this cadence keeps me active as a passionate developer, teacher and trainer,” said José Paumard assistant professor, University Sorbonne Paris Nord and co-organizer, Paris Java User Group. “I have eagerly awaited using Records to improve the performance and readability of my data processing code, and after being able to use it as a preview feature, it is now going live with this latest release.”

Developers can learn more about Java 16 and get hands-on experience at Oracle Developer Live: Java Innovations on March 23, 25 and 30.

Note: Oracle and Java are registered trademarks of Oracle Corporation. UNIX is a registered trademark of The Open Group.
]]>