Home > Net >  Could you tell me the.net 3.1 to generate the core library, can give Java calls?
Could you tell me the.net 3.1 to generate the core library, can give Java calls?

Time:11-18

Company's desktop software is c #, AnZhuoDuan is Java, has achieved some features in c #, don't want to use on the android Java implementation again, think not to say that. Net core can be cross-platform? That with the latest the.net core3.1 can be generated on the android Java libraries can be called directly?
Thank you for your guidance.

CodePudding user response:

Can ah, you in android run a set of ubuntu server virtual machine, in the ubuntu server to run a virtual machine. The.net core,

CodePudding user response:

Obviously you can't, the.net generated as DLL and use Java jar,,,,

CodePudding user response:

If your goal is for the development of different devices, basically use the same set of code, suggest you use Xamarin Dotnet direction,
[Xamarin allows you to use. NET code and platform specific user interface to generate suitable for Android, iOS and macOS native applications,]
https://docs.microsoft.com/zh-cn/xamarin/

If your goal is to integrate Dotnet and Java service,
Interaction between the most common way is to service, using certain interprocess communication protocol, such as a Java program using Microsoft SQL server is a kind of example,

If you just want to know about Java and Dotnet may call mechanism, so to understand:
1, cross-platform support for working in different platform, it is not the same as support call by any host,

2, Dotnet compiled the program (partly Dotnet intermediate language), * requires a Dotnet runner *, the runner understand Dotnet program, can be instantaneous compiling Dotnet intermediate language, can provide recycling services and so on host,

3, the same, a Java program is compiled into intermediate language, also need a runner (Java Virtual Machine) to load, instant compilation, and garbage collection services,

As a result, the Java is not directly into the Dotnet program, and vice versa, however, can have such a host, the host at the same time into the Dotnet runtime and Java runtime, so can be in the implementation in a process, at the same time run Dotnet and Java code, however, Dotnet and Java still can't understand each other directly, any call/interaction between them, need extra effort, such as need a host to translation and mediation,


CodePudding user response:

The colleague ask to find a little experience

CodePudding user response:

Don't know, I didn't try,
https://blog.csdn.net/u012878073/article/details/84936396

CodePudding user response:

Into a web Api
  •  Tags:  
  • C#
  • Related