user16332

Results 9 comments of user16332

Android is now supported via haskell.nix, plus some minor gotchas. https://github.com/tweag/inline-java/issues/197 https://github.com/tweag/inline-java/issues/198 https://github.com/tweag/inline-java/issues/199

> exciting! Is there already a blog post or something that shows this in action? Just getting started but I'll remember to ping you. Meanwhiile @angerman is the (somewhat involuntary)...

the above commit includes fixes for issue [197](https://github.com/tweag/inline-java/issues/197)

> 1. Would it be helpful in any way if I uploaded new versions of `jni` and `jvm` packages to hackage? Hackage needs `.cabal` files just like `haskell.nix`, that's why...

Some more thoughts: - there are basically two different Java interop approaches. Either you have a Haskell executable (Haskell `main`) and call into a JVM that you create from Haskell...

> In the case of sparkle, the JVM is calling into Haskell. Ah well that's just like Android then, and I also have a desktop JavaFX app which works like...

Sounds like a plan but where does the code calling `setJVM` get the pointer to the JVM from? My `jniInit` example above is essentially that but it takes a `JNIEnv`...

Yes both are not exposed by the `jni` library. how does *Haskell* code get this pointer. Add `GetJavaVM` to `jni`? That would make sense. It would be the `jniInit` code...

No too sure how it all comes together but I'd like to avoid having the user have to implement a C shim. Currently with `jniInit` my solution is pure Haskell...