Re: arsd.jni

2022-12-17 Thread jni via Digitalmars-d-learn
On Monday, 12 December 2022 at 15:03:13 UTC, Adam D Ruppe wrote: On Monday, 12 December 2022 at 11:17:47 UTC, jni wrote: It's good. But you did the java bindings by hand or is there a generator in arsd.jni for that too? It does it automatically. You compile jni.d with `-version

Re: arsd.jni

2022-12-13 Thread jni via Digitalmars-d-learn
On Monday, 12 December 2022 at 15:03:13 UTC, Adam D Ruppe wrote: On Monday, 12 December 2022 at 11:17:47 UTC, jni wrote: It's good. But you did the java bindings by hand or is there a generator in arsd.jni for that too? It does it automatically. You compile jni.d with `-version

Re: arsd.jni

2022-12-12 Thread Adam D Ruppe via Digitalmars-d-learn
On Monday, 12 December 2022 at 11:17:47 UTC, jni wrote: It's good. But you did the java bindings by hand or is there a generator in arsd.jni for that too? It does it automatically. You compile jni.d with `-version=WithClassLoadSupport` and then write a main function that calls `jarToD("

Re: arsd.jni

2022-12-12 Thread jni via Digitalmars-d-learn
But I never used android beyond hello world so i just don't know THAT much about it. Nice. Some of those names do look different but I will give it a try. Your arsd.jni library can be used to translate the headers then that is helping the cause already. I am not sure if the names

Re: arsd.jni

2022-12-11 Thread Adam D Ruppe via Digitalmars-d-learn
On Monday, 12 December 2022 at 01:19:23 UTC, jni wrote: The boilerplate is easy but Then the other part is a problem for me is the necessary other Java classes. They are not part of the NDK so the only way to load the jar is to use jni? Is that correct? I haven't updated this for a

Re: arsd.jni

2022-12-11 Thread jni via Digitalmars-d-learn
function in arsd.jni but I wasn't sure how it fit into the lib or what it was used for "translator"? I wasn't sure. For the Apache client library and the other 2 jar classes I will use with it then writting all the Java binding seems inevitable. This makes me want to use D more and mor

Re: arsd.jni

2022-12-11 Thread Adam D Ruppe via Digitalmars-d-learn
I don't know how to do much of anything on Android, but if you can post a small Java code example, I can suggest how to use it from D. You can bind many classes through the jni. The biggest limitation is you can't do callbacks or subclasses through android jni, so it is kinda limited for

Re: arsd.jni

2022-12-10 Thread jni via Digitalmars-d-learn
the optional Android Studio together with the arsd.jni, please, I wish to share with you my questions and concerns for the best way to move forward with this massive undertaking this thing, and how to go about calling android platform functions using arsd.jni and other D lang technologies from

Re: Trouble with Android and arsd.jni

2020-09-10 Thread kinke via Digitalmars-d-learn
On Thursday, 10 September 2020 at 13:14:00 UTC, burt wrote: However, the app is still crashing when I load it, and there appears to be an issue in Runtime.initialize(), which is called from JNI_OnLoad(), which is defined in arsd.jni. The debugger tells me that it was calling `getStaticTLSRange

Re: Trouble with Android and arsd.jni

2020-09-10 Thread burt via Digitalmars-d-learn
in arsd.jni. The debugger tells me that it was calling `getStaticTLSRange`, which calls `safeAssert` in the `__foreachbody`, which fails and eventually aborts.

Re: Trouble with Android and arsd.jni

2020-09-10 Thread kinke via Digitalmars-d-learn
On Thursday, 10 September 2020 at 11:16:55 UTC, burt wrote: However, I am getting linker errors, telling me that _tlsend, _tlsstart and __bss_end__ are missing. Perhaps you happen to use some stale artifacts? These magic symbols aren't used anymore in druntime since LDC v1.21, and not

Trouble with Android and arsd.jni

2020-09-10 Thread burt via Digitalmars-d-learn
Hello, I'm trying to upgrade and improve an Android project I was working on a while ago. For this reason, I decided to upgrade my compiler to the newest LDC (v1.23.0). I am using the arsd.jni library for the JNI headers and for initializing the runtime. However, I am getting linker errors