Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/sample/vm/jvm-clr/README.txt
38829 views
This sample provides C# "Hello World" program that is invoked1from Java application in the same process.23There is no way to invoke .NET methods from Java classes directly,4it is necessary to use native code level.5The sample contains C++ library that can invoke any .NET program by mscorlib library.6Using the JNI the Java application invokes the C# "Hello World".78The sample contains the following files:910Makefile - make file11README.txt - this readme12invoked.cs - the invoked HelloWorld Java program13invoker.java - C# invoker application14invoker.cpp - C++ wrapper15invokerExp.h - wrapper library exports16invoker.h - javah generated file with the native method definition1718After the success making the following files are produced:1920invoked.exe - the executable HelloWorld .NET program21invoker.class - the compiled Java class that invokes the .NET program22invoker.dll - the wrapper library2324The following environment needs to be set for the correct sample25build and execution:2627INCLUDE must contain the paths to:281. MS Visual C++ standard include292. .NET SDK include303. Java includes31Example: %MSDEV%/VC98/Include;%DOTNET%/Include;%JAVA_HOME%/include;%JAVA_HOME%/include/win323233LIB must contain the paths to:341. MS Visual C++ standard libraries352. .NET SDK libraries36Example: %MSDEV%/VC98/Lib;%DOTNET%/Lib3738PATH must contain the paths to:391. MS Visual C++ standard bin402. MS Dev common bin413. .NET SDK libraries424. Java bin43Example: %MSDEV%/VC98/Bin;%MSDEV%/Common/MSDev98/Bin;%DOTNET%/Lib;%JAVA_HOME%/bin;%PATH%4445To run the sample please do:4647java invoker invoked.exe484950--Dmitry Ryashchentsev515253