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

x86 Version #30

Open
starguy opened this issue Jun 18, 2014 · 7 comments
Open

x86 Version #30

starguy opened this issue Jun 18, 2014 · 7 comments

Comments

@starguy
Copy link

starguy commented Jun 18, 2014

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.

@jpyman
Copy link

jpyman commented Aug 14, 2014

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.

@starguy
Copy link
Author

starguy commented Aug 18, 2014

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

@xiaoyu1985ban
Copy link

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

@jpyman
Copy link

jpyman commented Aug 20, 2014

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.

@starguy
Copy link
Author

starguy commented Aug 22, 2014

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?

@romikk
Copy link

romikk commented Feb 25, 2015

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

@tiggerite
Copy link

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

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