I played with Java 7 update 9 on mac a little bit and found an interesting thing.
I just ran a simple Java program with a JFrame
, and attach to it with lldb
. Then I checked libraries loaded by this Java program and I saw:
"/System/Library/Frameworks/JavaVM.framework/JavaVM"
in it.
So i have 2 questions:
what does this JavaVM do for Java 7? I thought Java 7 on mac is self-consistent like its corresponding versions on Windows and Linux. By using "nm", I can see this JavaVM defined many functions like JNI_CreateJavaVM, which is also defined in libjvm.dylib.
what should I link to for JNI libraries with Java 7? still
JavaVM.framework
? Can I link to libraries located under/Library/Java/JavaVirualMachine/jdk.1.7.0 directly.
Any help will be much appreciated.