javasysmon icon indicating copy to clipboard operation
javasysmon copied to clipboard

Uncompatible DLL loaded on Windows 64-bit

Open MightyEagle82 opened this issue 10 years ago • 12 comments

Windows monitor tries to load DLL depending on the system architecture. But I have Java 32-bit installed on Windows 64-bit. So I get next error: Can't load AMD 64-bit .dll on a IA 32-bit platform.

MightyEagle82 avatar Dec 24 '14 13:12 MightyEagle82

Hello,

there is also a 64 bit version of Java (SDK / SE) out there. Why don't you give it a try?

Greetz cj

starguy avatar Dec 24 '14 16:12 starguy

I have a reason why I use that version. So because there is possibility to run both versions of JDK (32- and 64-bit) on Windows 64-bit, i think your library should work regardless which version it is used on.

MightyEagle82 avatar Dec 24 '14 19:12 MightyEagle82

From my point of view I don't see any good reason to run a 32 bit JDK on a 64 bit Windows system. And only because there is the possibility to do something one won't do anything just because it's possible ;-) switching to a 64 bit version is also possible and in my opinion preferable.

But if you really have a good reason why you need the 32 bit solution, you may feel free to branch the javasysmon lib and adapt / improve it to your needs. Again it's open source (and at least not my software ;-) )

starguy avatar Dec 25 '14 16:12 starguy

  1. If you don't see something, it doesn't mean that it doesn't exist.
  2. Also it isn't evil to run 32-bit application on 64-bit system even there are 64-bit version of that application.
  3. And also Java program is executed by JVM first and then by OS, so it is more logical to check Java environment first especially when JNI is used.

P.S. I don't want to branch the library because it is unnecessary. P.S.S. You are a driver. :)

MightyEagle82 avatar Dec 25 '14 16:12 MightyEagle82

At 1. I like your philosophical approach :-) At 2. There is no EVIL (it's only in your head) At 3. Still I see some advantages (available memory) in using the 64 bit version but still none in the 32 (yeah I know, there are a lot of things out there I can't see :-) )

At the rest: I'm totally with you :-))

starguy avatar Dec 25 '14 17:12 starguy

It isn't philosophy (electromagnetic waves, for example). And I'm not talking about reasons, advantages and so on. I'm just trying to think logically. :) Java apps run on JVM. But JVM is OS-specific. So if Java app uses OS-depended capabilities, i think it should check JVM abilities first. Sorry for my insistence. :)

MightyEagle82 avatar Dec 25 '14 19:12 MightyEagle82

The Windows DLLs were incorrectly recompiled in commit f50e6d4e8bd0c095523583d2e7076f32fc694a33, i.e.

dumpbin /headers lib\native\javasysmon.dll | find "machine"
            8664 machine (x64)

dumpbin /headers lib\native\javasysmon64.dll | find "machine"
            8664 machine (x64)

The lib\native\javasysmon.dll version should be targeting x86. Consequently, javasysmon is broken on 32-bit Windows and with JRE 32-bit on 64-bit Windows.

kwong-pfpt avatar Feb 23 '15 14:02 kwong-pfpt

Please can someone fix this problem ? I am using javasysmon 0.3.4 because of this . As @kwong-pfpt pointed the problem is this commit . How we can recompile these files to point the correct .dll ?

goxr3plus avatar Feb 08 '17 11:02 goxr3plus

I created a fixed version and uploaded on this Github Repository -> https://github.com/goxr3plus/javasysmon

goxr3plus avatar May 03 '18 16:05 goxr3plus

@goxr3plus's javasysmon2 (https://github.com/goxr3plus/javasysmon2), which appears to be an extension of project linked to above, has resolved this problem for me.

sco-tt avatar Jul 16 '18 21:07 sco-tt

@sco-tt Nothing my dear friend, i mixed different stuff there 😂. It needs lot more work though to support all the features that i have added on readme, if you can help me ♥.

goxr3plus avatar Jul 16 '18 22:07 goxr3plus

@goxr3plus plus direct me to some issues and I'll try to pitch in

sco-tt avatar Jul 17 '18 15:07 sco-tt