Loading libraries from memory or jar files

Chris Vest mr.chrisvest at gmail.com
Thu Jan 16 18:46:46 UTC 2025


Hi,

SymbolLookup and the older System.load/loadLibrary all make the assumption
that any library we wish to load is located in a file on the, er, "native"
file system.

I guess this is a limitation inherited from dlopen and LoadLibrary.

Many Java projects that include native code, then tend to package their
native libraries as part of their jar files, and extract them to /tmp, or
the like, before loading them.

This old practice is starting to become problematic, since /tmp is now
often mounted with noexec for security.

So, is there some possible path forward that'll allow us to load libraries
from e.g. a memory segment instead of a file?

Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20250116/c589ba8e/attachment.htm>


More information about the panama-dev mailing list