KPathSea bindings for Java

Mike Marchywka marchywka at hotmail.com
Sun Jul 14 21:43:13 CEST 2024





________________________________________
From: texhax <texhax-bounces+marchywka=hotmail.com at tug.org> on behalf of Karl Berry <karl at freefriends.org>
Sent: Sunday, July 14, 2024 11:19 AM
To: erik at xerdi.com
Cc: texhax at tug.org
Subject: Re: KPathSea bindings for Java

    I tried to do the equivalent of lkpselib.c (LuaTeX),

Perfectly reasonable, but LuaTeX has the advantage of being a binary
executable that we already have to compile :). A library is a whole
different world.

    I can however create a fallback implementation, which simply calls
    kpsewhich in a Java Process in case the jkpathsea library is
    unavailable. That would still honor the security measures of
    KPathSea. Then TL simply doesn't have to ship the binary lib, but if
    it's found it will be used.

Sounds fine. As long as TL only has to ship pure Java
(arch-independent), it'll work for the distribution. Thanks. -k

---

I'm not sure what overall considerations you have but I routinely
use the c++ equivalent for invoking various utilities until
I can get a library or write my own code. This is an excellent
way to bring up complicated code. Most of toobib uses
"system"( IIRC ) to invoke things like a ws terminal
until I can pick and code stuff around a c++ web socket
library to talk to chrome. This also works for anything from grep to netstat
and these end up being easy to debug. 

fwiw.










More information about the texhax mailing list.