Welcome to Part 2 of this series, in which we will look at C language’s concept of pointers and structs.
Later on in this article, we will use Panama to mimic these concepts.
The goal is to call C function signatures that are often defined to accept pointers and structs.
-
Project Panama for Newbies (Part 1)
In this series of articles, we will explore the APIs from OpenJDK’s Project Panama.
My intent is to show you how to be proficient in using the Foreign Linker APIs (module ‘jdk.incubator.foreign’) as it relates to Java interoperability with native code.
While this article is for newbies, I assume you know the basics of the Java language, a little bash scripting, and a familiarity with C programming concepts. If you are new to C language don’t worry I will go over the concepts later.
-
Java 25: What’s New?
Table of Contents JEP 470: PEM Encodings of Cryptographic Objects (Preview)JEP 502: Stable Values (Preview)JEP 503: Remove the 32-bit x86 Port509: JFR CPU-Time Profiling (Experimental)514: Ahead-of-Time Command-Line Ergonomics515: Ahead-of-Time Method Profiling518: JFR Cooperative Sampling520: JFR Method Timing & TracingFeatures coming …
-
The Visitor Pattern – ‘Revisited’ using Data Oriented Programming techniques
Java Language improvements culminating in java 21 obviate the need for the verbose visitor pattern as we know it, instead elevating it into a first class language feature.
-
Async file IO with Java and io_uring
Table of Contents What is PanamaManaging memoryMaking calls up and downWhat is io_uringSingle read with Java and UringPerformance improvementsTurning pinning into yieldingBringing It All Together When I first started exploring Virtual Threads in Java, I wanted to understand everything about …
-
Java 24 : What’s New?
Table of Contents JEP 404: Generational Shenandoah (Experimental)JEP 450: Compact Object Headers (Experimental)JEP 472: Prepare to Restrict the Use of JNIJEP 475: Late Barrier Expansion for G1JEP 478: Key Derivation Function API (Preview)JEP 479: Remove the Windows 32-bit x86 PortJEP …
-
Foojay Podcast #63: How do we keep our Java applications up to date and secure?
Table of Contents Last month, I published a Foojay article about the risks in systems that are stuck on old or outdated Java versions and got a lot of feedback from developers. Most of them want to move on but …
-
Foojay Podcast #62: Better Coding with AI: Friend or Enemy?
Table of Contents VideoPodcast AppsGuestsLinksContent AI, LLMs, ChatGPT—these are just a few of the buzzwords of the massive revolution unfolding right now. These tools are reshaping how we work, but they come with a catch: while they help us work …
-
Exploring New Features in JDK 23: Builder Pattern Simplicity with JEP-455 Primitive Types in Patterns, instanceof, and switch (Preview)
Table of Contents Building a vehicleConclusionReferences The runtime initiation of any program requires allocating a given memory and after many additional steps the first object could be created. In a previous post, we explored how to improve maintainability of complex …
-
Exploring New Features in JDK 23: Null object pattern to avoid null pointer exception with JEP-455
Table of Contents Functional nature of the code and nullConclusionReferences The newest release JDK 23 [2] comes with a neat extension to pattern matching for switch and instanceof statements, JEP-455: Primitive Types in Patterns, instanceof and switch [1]. While the …
-
Exploring New Features in JDK 23: Factory Pattern with Flexible Constructor Bodies with JEP-482
Table of Contents Creational design pattern factory reviewSimplifying factory method with JEP-482ConclusionResources Since the introduction of the new JDK release cadence, we have seen an incredible amount of new enhancements added to each JDK cycle, kicking the Java platform back …