Does OpenJDK statically link the C++ runtime?

John Von Seggern vonseg at gmail.com
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."
--http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4694590

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:
http://stackoverflow.com/questions/8722320/is-the-java-native-interface-jni-affected-by-c-abi-compatibility-issues

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

Thanks,
-John



More information about the build-dev mailing list