How to run: 1. compile Callback.java 2. compile the native code into a shared lib cl /Ie:\j2sdk1.4.0\include /Ie:\j2sdk1.4.0\include\win32 /LD /FeMyImpOfCallback.dll Callback.c 3. run: java Callback