3 ms·
Not a Java dev... How would one use the Java APIs from a Go application? I'm used to the reverse, Java calling external library.
by magicalhippo 1y ago
Not a Java dev...
How would one use the Java APIs from a Go application?
I'm used to the reverse, Java calling external library.
- izacus 1y agoThe same way, just with the native side of JNI API. Usually you'd make a Java/Kotlin/Whatever class that does the JVM code (e.g. calls out to Android, retrieves the list of files, processes that and prepares the most reasonable subset of data to be passed into Go world) and then use JNI APIs to instantiate it and call it. (Alternatively, you can instantiate such a proxy class at app startup and pass it into Go world when you call into it for the first time.)
- magicalhippo 1y agoAh ok. Still, that would be a very large change to incorporate, given the current Syncthing app is just a light wrapper of the main Go application as I understand it.