119N/AThis sample provides Java "Hello World" program that is invoked
119N/Afrom C# application in the same process.
119N/A
119N/AThe problem of direct call of the JVM API from CLR applications
119N/Aby PInvoke interface is the JVM API functions do not have static
119N/Aadresses, they need to be got by JNI_CreateJavaVM() call.
119N/AThe sample contains C++ libraty that wraps JVM API calls by the
119N/Astatic functions that are called from the C# application by
119N/APInvoke interface.
119N/A
119N/AThe sample contains the following files:
119N/A
119N/AMakefile - make file
119N/AREADME.txt - this readme
119N/Ainvoked.java - the invoked HelloWorld Java program
119N/Ainvoker.cs - C# invoker application
119N/Ajinvoker.cpp - C++ wrapper
119N/AjinvokerExp.h - wrapper library exports
119N/A
119N/AAfter the success making the following files are produced:
119N/A
119N/Ainvoked.class - the compiled HelloWorld class
119N/Ainvoker.exe - the executable .NET program that invokes Java
119N/Ajinvoker.dll - the wrapper library
119N/A
119N/AThe following environment needs to be set for the correct sample
119N/Abuild and execution:
119N/A
119N/AINCLUDE must contain the paths to:
119N/A 1. MS Visual C++ standard include
119N/A 2. .NET SDK include
119N/A 3. Java includes
119N/A Example: %MSDEV%/VC98/Include;%DOTNET%/Include;%JAVA_HOME%/include;%JAVA_HOME%/include/win32
119N/A
119N/ALIB must contain the paths to:
119N/A 1. MS Visual C++ standard libraries
119N/A 2. .NET SDK libraries
119N/A 3. jvm.dll
119N/A Example: %MSDEV%/VC98/Lib;%DOTNET%/Lib;%JAVA_HOME%/jre/bin/client
119N/A
119N/APATH must contain the paths to:
119N/A 1. MS Visual C++ standard bin
119N/A 2. MS Dev common bin
119N/A 3. .NET SDK libraries
119N/A 4. Java bin
119N/A 5. jvm.dll
119N/A Example: %MSDEV%/VC98/Bin;%MSDEV%/Common/MSDev98/Bin;%DOTNET%/Lib;%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin/client;%PATH%
119N/A
119N/ATo run the sample please do:
119N/A
119N/A invoker.exe invoked
119N/A
119N/A
119N/A--Dmitry Ryashchentsev