Project Panama: Say Goodbye to JNI

preview_player
Показать описание

So, you think you need Java Native Interface? Think again: Project Panama APIs and tools provide a safe, modern and efficient way to access foreign memory and code from Java.

Presented by Maurizio Cimadamore - Compiler Architect

⎯⎯⎯⎯⎯⎯ More information ⎯⎯⎯⎯⎯⎯

Tags: #Java #OracleDevLive #Java18 #JDK18 #OpenJDK
Рекомендации по теме
Комментарии
Автор

10:35 I created a very similar off heap memory management api as a proof of concept project. It also made the pointer release the memory with try resource if desired. It additionally provided a way to store java objects that only contain primitive data on the off heap and provided an api to access and manipulate the object. Of course it made heavy use of the "illegal" unsafe class.

redcrafterlppa
Автор

Very helpful presentation, thanks for publishing!

VisruthCV
Автор

what about the bluetooth capability, does Panama know how to deal with it or JNI wins for it?

FgroupIndonesia
Автор

Finally, I used JNI in one project (implemented some part of logic in C++ to conserve memory) and JNI was a horrible solution, there were so many points you could do a mistake that they should have called it ITC (Invitiation To Crash). BTW, I would not have had to do this if Java had supported value objects (the extra memory overhead that comes with heap objects was prohibitive) and true generics (no overhead of boxing primitives).

JanuszKrysztofiak
Автор

not clear for understand,
hurd for use

myashik
Автор

There is nothing wrong with the JNI, this is pointless.

andrewomahony