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

ProcessInfo.html#getCommand() returns wrong information on Windows #15

Closed
EleotleCram opened this issue Jul 19, 2012 · 1 comment
Closed

Comments

@EleotleCram
Copy link
Contributor

According to [1] ProcessInfo#getCommand() should return:

"The command that was originally used to start this process."

This means that for a process started like: "java -jar javasysmon.jar"
The returned string should be, well, just that: "java -jar javasysmon.jar"

Currently this only works as advertised on Linux. The docs state that it shouldn't work for MacOSX and Solaris, but I can confirm it doesn't work for Windows either. On windows the returned string is retrieved using "GetProcessImageFileName", this does not return the command line string that was used to start the process, it returns rather a string like:

"\Device\HarddiskVolume1\WINDOWS\system32\java.exe"

Which is not what you want.

[1] - http://jezhumble.github.com/javasysmon/com/jezhumble/javasysmon/ProcessInfo.html#getCommand()

@EleotleCram
Copy link
Contributor Author

I have fixed the above issue, expect a pull request shortly.

__
Marcel

jezhumble added a commit that referenced this issue Mar 19, 2013
Fixes #15 : ProcessInfo.html#getCommand() returns wrong information on W...
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

1 participant