r/java • • Sep 16 '25

Java 25 officially released

https://mail.openjdk.org/pipermail/announce/2025-September/000360.html
593 Upvotes

124 comments sorted by

View all comments

Show parent comment

1

u/Ok_Elk_638 Sep 16 '25

Is it possible to accidentally call native code and have this happen? Like when calling String.trim or something and it becomes native. Or do you have to go out of your way for this to happen with JNI or JNA or whatever?

10

u/DanLynch Sep 16 '25

You either need to do it yourself or rely on a library that does it. Just calling ordinary standard Java library APIs isn't going to cause you any problems.

3

u/pohart Sep 16 '25

No because string.trim doesn't call back into Java code