Answer the question
In order to leave comments, you need to log in
Is it possible to get the name of the account from which they are logged into windows using java?
Is it possible to get the name of the account from which they are logged into windows using java? If yes, please tell me how it can be done?
Answer the question
In order to leave comments, you need to log in
public static void main(String[] args) {
String userName = System.getenv("USERNAME");
System.out.println(userName);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question