need to escape newlines when sending through the socket
Pkg.installed is deprecated, I have implemented a workaround using Pkg.dependencies()
there was no way to read the stdout from the java side
there was no way to react to errors (stderr) from the java side
though the current solution can not differentiate between warnings (e.g. deprecation) and errors sadly
replaced org.json with jackson (better handling of array vs object)
make it recover from more error cases (e.g. errors during "get" operations and don't close during errors in "exec" operations)
If you like you can have a look and backport some fixes. The fork also includes a testsuite for writing/reading various data types (including vectors and matrices).
Though I guess https://github.com/org-arl/jajub could be a more sophisticated solution since it seems to support binary transport and does not require a socket. But still, it is good to have options to choose between. Using json/socket based communication might be more robust long term, despite being slower.