#27 Can't find 32bit JRE on 64bit Windows

open-invalid
nobody
None
5
2014-07-21
2012-01-03
nickrahn
No

So, I'm filing this as a bug, but maybe there's something else I should be doing. Right now, my installer detects if we're on a 64bit machine and so installs the 64bit winrun4j executable. But if the user has only a 32bit JRE installed, the 64bit winrun4j can't find the JRE. That is, if you have only a 32bit JRE installed on a 64bit Windows, winrun4j (64bit) executable is not able to find the JRE and gives the "Failed to find a Java VM" message.

I looked in the code and found a place in VM.cpp (line 211) where it seems you're checking for this possibility, but it doesn't seem to work on my setup. I'm using Windows 7 64bit and have the winrun4j 64bit executable. With the JRE 1.6.0_30 32bit installed, I get the "Failed to find a Java VM", but with the 64bit version installed it can find it and works correctly.

I also tried adding a "vm.location" pointing to the 32bit JVM.dll in the ini file, but then I get a "Failed to start Java VM" error. My guess is that the 64bit winrun4j version can't load the 32bit dll. Is that correct?

Should winrun4j be able to handle this possibility? Or is there some other way of handling this?

Discussion

  • Peter Smith
    Peter Smith
    2012-01-04

    This is a limitation of the operating system. A 64bit process cannot load a 32bit DLL.

     
  • nickrahn
    nickrahn
    2012-01-04

    Ok. thanks. I'll have to do more testing on this and see if I can update my install process accordingly. Sorry for the trouble.

     
  • nickrahn
    nickrahn
    2012-01-04

    • status: open --> open-invalid