Applications Previous
Previous
Welcome
Welcome
Next
Next

Microsoft VM for Java Native Interface

This sample demonstrates use of the native interface of the Microsoft Java VM. Our methods are implemented in a .DLL. We access various methods and variables from native code. We also demonstrate GC-safe operations in native code.

JMain's constructor loads our DLL file, and then proceeds to call various methods to demonstrate Java - native code interaction.

Contents

java\ JMain.java JFoo.java JThread1.java JThread2.java makefile native\ natlib.c makefile bin\ javah.exe include\ native.h lib\ msjava.lib

To Build

nmake /a invokes the makefile in this subdirectory.

To Run

cd binaries
jview JMain
Top © 1996-1997 Microsoft Corporation. All rights reserved.