Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncompatible DLL loaded on Windows 64-bit #34

Open
MightyEagle82 opened this issue Dec 24, 2014 · 12 comments
Open

Uncompatible DLL loaded on Windows 64-bit #34

MightyEagle82 opened this issue Dec 24, 2014 · 12 comments

Comments

@MightyEagle82
Copy link

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.

@starguy
Copy link

starguy commented Dec 24, 2014

Hello,

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

Greetz
cj

@MightyEagle82
Copy link
Author

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.

@starguy
Copy link

starguy commented Dec 25, 2014

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 ;-) )

@MightyEagle82
Copy link
Author

  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. :)

@starguy
Copy link

starguy commented Dec 25, 2014

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 :-))

@MightyEagle82
Copy link
Author

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. :)

@kwong-pfpt
Copy link

The Windows DLLs were incorrectly recompiled in commit f50e6d4, 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.

@goxr3plus
Copy link

goxr3plus commented Feb 8, 2017

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
Copy link

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

@sco-tt
Copy link

sco-tt commented Jul 16, 2018

@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.

@goxr3plus
Copy link

@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 ♥.

@sco-tt
Copy link

sco-tt commented Jul 17, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants