views:

776

answers:

1

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.

A: 

Use dependency walker to figure out what dll is missing.

Omry
Thanks for the reply. This is a great tool. When running the profiler, I'm getting an error: LoadLibraryA("C:\bin\verify.dll") returned NULL by thread 1. Error: The specified module could not be found (126)It says that it is being called by c:\windows\system32\JVM.DLLTwo questions that maybe you can help resolve:1) Why is it calling the system32 JVM instead of the one in my PATH?2) Why would it try to look in C:\bin for any dll's?Thanks again.
Brittany
Java got a nasty tendency to install binaries into Windows\System32. you are probably running those instead of the one later in your path.if you intend to manually add java to the path just delete java and javaw from windows\system32.about the dll location, no idea.
Omry