You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently had to port my windows application from .NET Framework 4 to .NET Core (3.1) and part of the application is a Java frontend (for historical reasons) which performs interop with the C# API through a wrapper DLL with some static functions in it. For Java/C# interop is have been using jni4net, but this is not working with .NET Core anymore.
I was hoping that I could use xamarin/java.interop for that. I have cloned the repo and can build it successfully. I also have been looking at the source code examples / unit tests. But I can not figure out how to get it working for my use case.
I have a couple of questions:
Are there special requirements for the Java side? For example, is a specific JDK/JNI Version required?
Do I need to change Java code at all, when using this framework? I import my C# static functions with the native keyword...
Does java.interop generate the bridge jni interface between Java and C# (I assume this will be a native C++ DLL). How do I use source code generation for this?
Do I have to change the C# side? I saw an attribute for exporting methods in the source code. Is this the way to go?
It would be nice, if somebody can point me in the right direction.
Thank you and best regards
Philipp
The text was updated successfully, but these errors were encountered:
Java.Interop is largely a specialized case allowing interop between Mono's C# and Android's Java. Although there are probably some pieces that someone could take to build a more general solution on top of, this is not something that you can just drop into your project today.
I think you will be better off pursuing other options to achieve your goal.
Hello,
I recently had to port my windows application from .NET Framework 4 to .NET Core (3.1) and part of the application is a Java frontend (for historical reasons) which performs interop with the C# API through a wrapper DLL with some static functions in it. For Java/C# interop is have been using jni4net, but this is not working with .NET Core anymore.
I was hoping that I could use xamarin/java.interop for that. I have cloned the repo and can build it successfully. I also have been looking at the source code examples / unit tests. But I can not figure out how to get it working for my use case.
I have a couple of questions:
It would be nice, if somebody can point me in the right direction.
Thank you and best regards
Philipp
The text was updated successfully, but these errors were encountered: