Question

I wanted to know, suppose in android if there is an application which has some C/C++ code written in it. When this code is executed, it will require the native c libraries. So how does the DVM communicate with these libraries? Does it use Binder for getting the resources from library? or this part of code is not executed in JVM. If not where is this executed and how? And is there any link between JVM and the native libraries?

Was it helpful?

Solution

What do you mean by communicate? .so is loaded into vm, vm will parse the symbols and bind to java native methods if any. Basically vm does not talk to .so then. The byte code world is like a structured memory inside vm process, native method may read from or write into through jni environment routines which is part of vm.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top