Detect if Java application was run as a Windows admin

前端 未结 8 2150
天命终不由人
天命终不由人 2020-11-27 05:37

I have a Java application. Is there anyway I can tell if the process was run with admin privileges, on Windows 7.

8条回答
  •  孤街浪徒
    2020-11-27 05:58

    Only by attempting an operation which requires such access (like binding a low-numbered port, or opening a known-to-be-protected file).

提交回复
热议问题