I\'m designing a little software in Java. I don\'t know the term/definition to what I\'m doing, but I\'m prompting commands from Java to the terminal. Something like this:>
This also looks promising: cocoasudo

It uses the OSX native Authorization Services API:
For Mac OS X Cocoa-based apps, there is analagous ability to sudo provided via the Authorization Services API. Use of the API allows you to prompt the user for their username and password requesting the ability to escalate privileges.
…
For that case, I’ve written a small utility that I’ve dubbed cocoasudo. Use cocoasudo in much the same way you’d use sudo. However, instead of users being prompted for their password in a Terminal window, they’ll get a dialog prompt via the Authorization Services API.