开发者

retrieving the workgroup name of a computer running windows operating system

开发者 https://www.devze.com 2023-01-26 20:42 出处:网络
I am currently working on my final year project at the University. I am developing a LAN messager program in JAVA. I would like to use the computer names as the usernames and the workgroups as the cha

I am currently working on my final year project at the University. I am developing a LAN messager program in JAVA. I would like to use the computer names as the usernames and the workgroups as the chatroom names. So far I don't have problems retrieving the computer names but the problem is with retrieving the workgroup names. Any assistance will开发者_StackOverflow be highly appreciated. Thank you in advance.


On my machine I have a System property env.USERDNSDOMAIN which holds my DNS domain.

I also have a System property env.USERDOMAIN which seems to hold my Windows domain name.


After some googling, I found out you can access the Windows registry by using java.util.prefs.Preferences. Finding out where in the registry to look can be your homework :^)

0

精彩评论

暂无评论...
验证码 换一张
取 消