Making native calls from the JVM

Samuel Audet samuel.audet at gmail.com
Sun Dec 28 01:01:27 UTC 2014


Hello,

On 12/25/2014 05:11 AM, Henry Jen wrote:
> jextract is a tool parsing the header file, which will be able to
> support C/C++. We will need a mechanism to describe object layout based
> on information collected from jextract and thus can properly access the
> data and function.
>
> It's still early to say what will end up to be, JNR offers a way to bind
> Java API to native API without the need to write native code as JNI, I
> think that's the goal of project panama, trying to minimize(if not to
> comletely eliminate) the need to write native code and give JVM the
> opportunity to optmize the call into native APIs.

Thanks for the input! Yes, that's my understanding as well, I'm just 
curious as to how this is going to work in the case of C++ templates, 
for example. Those basically require a full C++ compiler, which Clang 
can provide, but does that mean that we are effectively going to double 
the size of the JDK just to support C++? And what happens with C++ ABIs 
not supported by Clang? It barely supports the one from MSVC as it is:
	http://clang.llvm.org/docs/MSVCCompatibility.html
As you say, I suppose it's too early to say where this is all going to 
end up, but it's the kind of discussion that I would be interested in...

Samuel



More information about the panama-dev mailing list