Is there any error printed out from the console when the JVM not successful ? Something like: Error Output: Error occurred during initialization of VM Unable to load native library: Can't find dependent libraries. Take a look at this http://stackoverflow.com/questions/1912962/jni-java-in-c
I tried your code, and compile in MSVC 2008 (using jdk1.6.0_24) looks working (with some modification of your code to use cplusplus version instead of c -- this one should not matter).