Home Tutorialhelp Allcomments Java Java Get Example Java Get Windows Username

 
 

Comments

 
User Comments for the tutorial:

Java get windows Username



Total comments: 1      View Tutorial    Discuss: Java get windows Username
Comments

use NTSystem.getName() instead
With Java >= 5.0 on Windows you can also use String userName = new com.sun.security.auth.module.NTSystem().getName(); System.getProperty("user.name") is much less secure because a user cat set the USERNAME environment variable to what he wants (sa 

Related Tutorial and Articles

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.