java-native-access / java-native-access/jna
Processes run as admin don't show up in WindowUtils.getAllWindows(boolean)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8.9k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
When an executable is run with "Run this program as an administrator" toggled on in Compatibility settings in Windows 10, it appears to not show up in calls to WindowUtils.getAllWindows(boolean).
I guess this may be intentional as a restriction of the OS, and might be bypassed by running the Java process as admin, but perhaps it's worth mentioning in the docs somewhere (if it's not already)? Just spent a fair chunk of time trying to figure out why a process was missing from the list of DesktopWindows that is returned. I admit I haven't spent much time looking into it, was just glad to realize that turning off the "Run as admin" toggle made the process show up again. I figure even if it doesn't warrant a minor update to the docs it can't hurt to document it as an issue here for posterity!
(this is on latest JNA)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the WindowUtils.getAllWindows(boolean) entry point and review the existing documentation for its Windows behavior. Confirm the documented limitation for processes run as administrator, then add a concise note explaining the observed behavior and the relevant permission context. No specific documentation file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop, documentation, operating-systems
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100