开发者

retrieving the workgroup name of a computer running windows operating system

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜