Check for admin privilege

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sasi

    Check for admin privilege

    Is there any way I can find out whether the current user has
    administrator privileges through Java?

    Thanks in advance

    Sasi
  • Anthony Borla

    #2
    Re: Check for admin privilege


    "Sasi" <kvsasi@hotmail .com> wrote in message
    news:85cd0e66.0 311101415.58f70 [email protected] gle.com...[color=blue]
    >
    > Is there any way I can find out whether the current user has
    > administrator privileges through Java?
    >[/color]

    This task is OS-specific. Either:

    * A JNI routine is available that makes the relevant OS call
    to obtain this data. The relevant library would, of course,
    need to already be installed

    or:

    * The relevant OS command-line utility could be called
    through 'Runtime.exec'

    The latter option may be worth exploring. Talk to your system administrator
    and ask about any such utilities.

    I hope this helps.

    Anthony Borla


    Comment

    Working...