I want to develop an Java application that can detect the user logged on a Window Domain. These credentials are going to be used to logging on the Java application.
Note: System.getProperty("user.name") will only work if the user launches the application. If the program is run by System or an application like LANDesk, then the user will come out as "SYSTEM" (under domain "NT AUTHORITY").
In which case, the second solution using NTSystem will return the correct results.