I'm getting the following error when running an executable I created on a 64-bit machine using C++ code:
"Error occurred during initialization of VM Unable to load native library: Can't find dependent libraries"
My PATH (shown below) obviously points to jvm.dll since I have that file in both C:\Progra~1\Java\jdk1.6.0_17\jre\bin and C:\Windows\System32
PATH=C:\Program Files (x86)\Gmake\bin;C:\Program Files (x86)\apache-ant-1.7.1\bin;C:\Progra~1\Java\jdk1.6.0_17\bin;C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools;C:\Progra~1\Java\jdk1.6.0_17\jre\bin\server;C:\Progra~1\Java\jdk1.6.0_17\jre\bin;C:\Windows\System32
Does anybody have any ideas as to what would cause this error? Thanks.
In my case, there was a jvm.dll file in the same folder as my exe file. I simply deleted the jvm.dll from there and it worked. Probably, it preceded the one in the PATH
This is how I solved a similar problem:
I got this error as my PATH (environment variable) has not set correctly.
Note: Do not move jvm.dll to your project directory.
I have the same issue when I run the java.exe in my Windows2008 R2 version.
my path was
when I run the java.exe under C:\Java\jdk1.6.0_33\bin, it works fine. I found that within the c:\Windows\System32\ comes with a copy of java.exe. When I run the c:\Windows\System32\java.exe, it shows the same error:
I fixed this issue by moving the C:\Java\jdk1.6.0_33\bin to the beginning of the PATH environment:
Hope this help.
Use dependency walker to figure out what dll is missing.