unable to load jvm.dll

5 posts / 0 new
Last post
baharev
Offline
Joined: 2011-09-16
unable to load jvm.dll

The relevant part of the error message:

C:\Python27\lib\site-packages\jpype\_core.pyc in startJVM(jvm, *args)
42
43 def startJVM(jvm, *args) :
---> 44 _jpype.startup(jvm, tuple(args), True)
45 _jclass._initialize()
46 _jarray._initialize()

RuntimeError: Unable to load DLL [C:\Program Files\Java\jre7\bin\client\jvm.dll]
, error = A megadott modul nem talßlhatˇ.
at src/native/common/include\jp_platform_win32.h:58

The text "error = A megadott modul nem talßlhatˇ" means: error = the module is not found.

I have double-checked: C:\Program Files\Java\jre7\bin\client\jvm.dll is there.

Any help is appreciated to fix this.

tove
Offline
Joined: 2009-04-08
Hi, My guess is that there is

Hi,

My guess is that there is a dependency (another dll) to jvm.dll that is not found. You could try starting the JVM from Python yourself and see if you get more information. In the IPython shell type:

import jpype

jpype.startJVM(jpype.getDefaultJVMPath())

 

If that does not work, you could try using e.g. DependenyWalker on your jvm.dll and see what dlls that are missing.

Best regards,
Tove

baharev
Offline
Joined: 2011-09-16
dll hell

Yes, you are right. At least the msvcr100.dll is missing and perhaps others. I am not interested in the Windows version. It was a workaround for me anyhow, something to try until I can get the Linux version of JModelica working.

mtiller
Offline
Joined: 2009-05-27
Same Error

I've just run into this same error.
 
BTW, the link you give to DependencyWalker is broken (or at least the site appears to be down).
 
I tried installing msvcr100.dll by installing the Microsoft VC++ runtime. This got me just a tiny bit farther. Instead of failing with the "Can't load module" error (alone), Windows now pops up a dialog telling me I'm missing msvcr71.dll and then JPype throws an error message.
 
However, I'm not missing msvcr71.dll. In fact, it's packaged in nicely with the JRE. But for some reason, my system can't find it. So the solution I found was to change the 'setenv.bat' file that came with JModelica to add one directory from the JRE to the end of PATH.
 
Specifically, I added ";%JAVA_HOME%\bin" to the end of the redefinition of PATH in setenv.bat.
 
Now I can get jpype and JModelica to run.  Just a tip in case anybody else runs into this.
 

tove
Offline
Joined: 2009-04-08
Hi, Thanks for posting your

Hi,

Thanks for posting your tip. The link to DependecyWalker seems to work now, the site was probably only temporarly down.

regards,
Tove

Login or register to post comments