Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using D to program to the Java Native Interface

I've been looking at the D programming language and it looks like a lot of fun to try for someone already proficient in C++.

Can I use D to program to the Java Native Interface which is a C interface?

like image 408
Hannes de Jager Avatar asked Sep 12 '10 20:09

Hannes de Jager


1 Answers

I don't know much about the JNI, but for functions declared extern(C), and using only C datatypes, D matches the C ABI, so the JNI should not even know the difference. You probably just need to translate a few headers to D, which can be partially automated with the htod utility.

like image 189
dsimcha Avatar answered Jan 01 '23 23:01

dsimcha