Is there a way in java to get the Logon User Name in the registry for windows authentication ?
If this "registry" is the active directory, then you could probably use the base JNDI libs, as active directory is compatible with LDAP.
Public Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" ( _
ByVal hKey As Long, _ ' Handle to open registry key
ByVal lpValueName As String, _ ' Name of value
ByVal lpReserved As Long, _ ' Reserved, must be 0
lpType As Long, _ ' Registry data type constant
lpData As Any, _ ' By reference variable for data
lpcbData As Long _ ' Number of bytes of data written
) As Long
You can use java's JNI to invoke functions that are native to that platform, using a language like C.
It calls the reg query ... command to extract values from registry.
No JNI required.
It's not portable, but that seems to be no issue for you.
Don't know where the current user's name for nt authentication is stored.