Note: This website is archived. For up-to-date information about D projects and development, please visit

Why does Java JNI not work for TioLink?

D and Java are both using a garbage collector. These GCs are suspending threads at their will and awake them if they are done. With JNI both share the same native threads, but the D GC does not know the Java GC nor vice versa. This is why they have to conflict sooner or later. I see no solution for this.

It seems, the Java code and the D code can only exist in separated processes. JNI cannot do that. An interprocess communication (IPC) is needed.

The requirements for this IPC in TioLink are:

  • cross language Java, D
  • available for all D plattforms Win32, Linux, Max OSX
  • good performance


  1. pure sockets/tcp
    [-] reinvent the wheel
  2. Corba
    [-] too much to implement
    [-] performance
  3. D-Bus (see DBus-D)
    [+] meets the requirements