From: arne@vajhoej.dk   
      
   On 10/13/2025 8:36 AM, Simon Clubley wrote:   
   > On 2025-10-11, John Dallman wrote:   
   >> They were expecting us to be impressed that they'd done JNI wrappers of   
   >> about ten functions from our 500+ function API. We said "Presumably you   
   >> have tools to generate this stuff automatically?" and they didn't   
   >> understand what we were talking about.   
   >   
   > Bloody &*&^* stupid JNI. :-( As someone who writes some programs for   
   > personal use on Android, containing a mixture of Java and C code,   
   > I bloody well _hate_ that interface. :-(   
   >   
   > I believe I may have mentioned this once or twice before. :-)   
      
   JNI is a very low level and very primitive interface. Very   
   1990'ish. It can be a PITA to work with.   
      
   It has been replaced by the Foreign Function interface   
   in Java 16 (2021) as incubator an Java 22 (2024) as final.   
      
   Several libraries has been created that provide an easier   
   interface on top of JNI.   
      
   Most famous is JNA.   
      
   If we focus on VMS, then I have also created such   
   a library: VMSCall. It speaks VMS calling convention   
   in Java.   
      
   In general: avoid JNI unless you really need it.   
      
   Arne   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|