Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Get Windows Logged in Domain Name Info from Java

807603Jan 9 2008 — edited Jan 12 2008
I am working on Core Java Swing Project running on Windows. The version of Windows can be anything from 98, 2000, XP, NT etc. My system needs 3 things to login to it namely: Username, Password, Domain

Is there any way to get Java to retrieve the windows domain name I logged into

Please note that its not a web application, but its a standard Standalone Java Program.

I have tried System.getProperty("user.name"); to get the username I have used to login to. SImilarly I require the domain name value used to login to the machine.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2008
Added on Jan 9 2008
7 comments
1,911 views