Does OpenJDK statically link the C++ runtime?

John Von Seggern vonseg at
Wed Jan 4 06:16:12 UTC 2012

Way back in a bug report for Java 1.4, I found this note:

"We statically link the C++ runtime in JDK and enabled linker script
to hide symbols from libstdc++ and other internal symbols."

Does OpenJDK continue to take this approach?

I'm asking because I would like to use the Java Native Interface to
call functions in a C++ library (that statically links the C++
runtime).  When I distribute my application, do I need to worry about
C++ ABI compatibility issues?

In case it's useful to anyone, I also asked this question on StackOverflow:

(I figured I'd also try asking here, too.  I apologize if this is the
wrong place.)


More information about the build-dev mailing list