javasysmon icon indicating copy to clipboard operation
javasysmon copied to clipboard

x86 Version

Open starguy opened this issue 10 years ago • 7 comments

Hi Jez,

thx for the new javasysmon-0.3.5. It works fine under windows 7 x64 and OpenSuse for my purposes (identifying and killing processes).

Unfortunately the javasysmon.dll seems to be compiled for the x64 platform too (instead of x86).

I allready cloned your repo and rebuild the windows c code for the x86 platform (using Visual Studio 2013 which converted the project to an .vcxproj) and javasysmon now also works fine within a x86 platform (windows 7).

Should I push these changes to your repo, or have you allready fixed this by yourself?

Greetz c

p.s.: btw I just run into a similiar problem running javasysmon under windows vista x64. with a javasysmon64.dll compiled for the Platform Toolset - v120_xp, build with a x64 configuration javasysmon works.

starguy avatar Jun 18 '14 08:06 starguy

Have you uploaded the dll anywhere? I would like to upgrade to 0.3.5 but really need it to work in an x86 environment.

jpyman avatar Aug 14 '14 06:08 jpyman

Nope, but if you tell me your favourite platform for sharing this .dll i will do so?

starguy avatar Aug 18 '14 08:08 starguy

Hi starguy, can you upload the dll ? Thanks a lot

xiaoyu1985ban avatar Aug 20 '14 05:08 xiaoyu1985ban

I would suggest you create a fork and replace the dll there. Then everyone can get a copy and Jez can pull it into the main repository too if he wants to.

jpyman avatar Aug 20 '14 06:08 jpyman

Thx for the hint with the fork guys! nice feature. forked + pull request created for faster access:

https://github.com/starguy/javasysmon.git

the compiled javasysmon jar could be find under dis/javasysmon-0.3.6.jar

Last question, whats the correct procedure: to leave this issue open till Jez took a look at the pull request, or closing it immediately?

starguy avatar Aug 22 '14 12:08 starguy

@starguy Still no joy with 32bit os:

D:\APPS>"C:\Program Files\Java\jdk1.6.0_24\bin\java" -jar ./lib/javasysmon-0.3.6.jar Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Documents and Settings\romikk\Local Settings\Temp\2\javasysmo1026278514061678309.dll: The specified procedure could not be found at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1003) at com.jezhumble.javasysmon.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:16) at com.jezhumble.javasysmon.WindowsMonitor.(WindowsMonitor.java:21) at com.jezhumble.javasysmon.JavaSysMon.(JavaSysMon.java:53) Could not find the main class: com.jezhumble.javasysmon.JavaSysMon. Program will exit.

romikk avatar Feb 25 '15 14:02 romikk

Line 10 of javasysmon.c needs to read #define _WIN32_WINNT 0x0501 to compile the library for running on an x86 machine running Windows Vista or earlier. Without this, the compiled DLL will look for K32EnumProcesses (amongst other things) which is only present in Windows 7 and above.

Even better than changing line 10 is to remove it completely and add the define as a preprocessor definition, along with WINVER=0x0501 and NTDDI_VERSION=0x05010000 to make completely sure that you are targetting XP (and Vista).

tiggerite avatar Oct 21 '15 13:10 tiggerite