Possible Duplicate:
Detect if Java application was run as an admin
How do I find out if the user running my Java application is a Windows administrator, or not?
Possible Duplicate:
Detect if Java application was run as an admin
How do I find out if the user running my Java application is a Windows administrator, or not?
Java is cross platform and there is no way to see directly whether the user is a Windows administrator. In general you should check for the priviledges you need instead of relying on some knowledge about what it means to be an administrator on Windows. For example, if you need to write to a file, check directly that the file is writeable etc...