Friends of OpenJDK

Native Language Access: Project Panama for Newbies

D.openjdk
Carl Dea
<p>A brief introductory talk on Java 17's New project Panama APIs to get your feet wet into the world of native language access or better known as Foreign Function Interface APIs (JEP 412).</p>
As a Java developer, you may have a need to access native libraries, such as Tensorflow, SqlLite, ffmpeg, OpenGL, but later find that JNI is your default choice. JNI (Java Native Interface) requires native code to be installed. You’ll quickly find that JNI wrapper code is difficult to maintain. New to OpenJDK 17 is the Foreign Linker API (JEP 412) as a replacement or alternative for JNI to provide a pure-Java solution and perform comparable to, or better than, JNI. The aim of this talk is to help you be proficient at creating Java programs capable of accessing devices and/or native libraries mainly focussing on OpenJDK 17’s Foreign Linker API. Intro (what, why, where)
 Requirements
 IDE, environment setup
 Getting started
 Anatomy of a Hello World in C
 What is jextract
 Panama Hello World in Java
 How to allocate memory to work with C primitives, arrays, &amp; C strings.
 How to allocate and mimic pointers, structs, and array of structs.
 What are VarHandles?
 What are MethodHandles?
 Using your super powers to access system libraries
 Using your super powers to access third party libraries (demos)
 Demos may include: OpenGL, LeapMotion device, Git, ffmpeg, Python, Swift, MacOS touchID, MacOS SpeechSynthesizer. All Code will be available online at https://github.com/carldea/panama4newbies

Additional information

Type devroom

More sessions

2/5/22
Friends of OpenJDK
Simon Ritter
D.openjdk
<p>Despite being nearly 27 years old, Java is still consistently rated in the top three most popular programming languages in use. The reason for this popularity extends beyond the syntax of the language to the power of the Java Virtual Machine (JVM). With its ability to handle internet-scale workloads, the JVM delivers the performance required for mission-critical enterprise applications.</p> <p>In this session, we’ll explore Java as it is in 2022. JDK 17 is the ninth (yes, ninth) release in ...
2/5/22
Friends of OpenJDK
Rudy De Busscher
D.openjdk
<p>By now, we all know that JDK 17 is the latest Java long-term supported release with several new language features. There are already many resources that explain the Java Record and Text Blocks in detail. But JDK 17 has much more interesting changes since JDK 11.</p> <p>In this session, I go into more detail about some other interesting changes that are not language features but are a good reason to switch to JDK 17.</p> <ul> <li>Improvements in the Class Data Sharing feature.</li> <li>JDK ...
2/5/22
Friends of OpenJDK
Julien Lengrand-Lambert
D.openjdk
<p>A little guide on how to convince management to try out new technologies!</p> <p>For you it's obvious, Kotlin is the next big thing and it'll bring your team to the next level. You see clear advantages, but others are not quite there yet. In this talk, I'll describe the ways we found to get Kotlin inside ING, one of the largest European bank. We'll look into simple ways to convince your colleagues, your management and make it a success for everyone!</p>
2/5/22
Friends of OpenJDK
Deepu K Sasidharan
D.openjdk
<p>Java 17 finally gave us the first incubator of Foreign Function &amp; Memory API. Let's do a test drive of what is in store and see if it is good enough to replace JNI. Let's be honest, JNI is not that secure and is controversial and it's high time we move away from it and adopt FFI like in many other modern languages. But is the new API enough or do we need to consider external libraries like JNA or JNR-FFI? I'll showcase some examples of using the new API with some of my other favorite ...
2/5/22
Friends of OpenJDK
Erik Costlow
D.openjdk
<p>A demonstration of log4j exploits, which defenses people tried, and which worked. We'll cover how groups responded effectively to patch to see what was common. We'll also look at open source funding models, subscriptions, and bug bounty programs to see why it's sometimes hard to donate.</p>
2/5/22
Friends of OpenJDK
Brian Vermeer
D.openjdk
<p>Building cloud-native Java applications is undoubtedly awesome.</p> <p>However, it comes with undeniable new risks. Next to your own code, you are relying on so many other things.</p> <p>Blindly depending on open-source libraries and Docker images can form a massive risk for your application.</p> <p>The wrong package can introduce severe vulnerabilities into your application, exposing your application and your user's data.</p> <p>Join this talk where we’ll show common threats, ...
2/5/22
Friends of OpenJDK
Jamie Coleman
D.openjdk
<p>Many developers don’t think about the JVM level when creating applications. It is something that just simply works. Now more applications are becoming cloud-native and we have JVM’s running in every microservice container, each performance gain can have massive benefits when scaled up. Some tweaks are very easy to implement and can have huge impacts on start-up time and performance of your applications. This talk will go through all the different JVM options and give you some easy and ...