Skip to content

passedbylove/JavaCallCSharp

 
 

Repository files navigation

JavaCallCSharp

Java call C# lib build with .NET CORE 2.0 via C++ as wraper The code is based on example from coreCLR

Java using JNI to call C++ code. then C++ host a core CLR to run C# code.

pre-require

JDK: You should edit the Makefile and set the JAVALIB PATH

.NET CORE SDK 2.0: I only tested it in Ubuntu 16.04 x64

gcc 6: std C++ 14 for the filesystem

usage:

javac Sample1.java

javah Sample1

make

cd cs

dotnet restore

dotnet build

java Sample1

You should keep the compiled file in the same fold.

About

Java call c# lib built with .NET CORE 2.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 81.8%
  • Java 7.0%
  • Makefile 6.3%
  • C# 4.9%