Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: WORKGROUP Date: Tue, 13 Dec 2011 07:52:37 -0800 (PST) Organization: http://groups.google.com Lines: 40 Message-ID: <19360385.2860.1323791557719.JavaMail.geo-discussion-forums@prnx7> References: <8f03213b-5a9e-40c5-b106-7f58a4398dae@t38g2000yqe.googlegroups.com> <9koul8Fhg9U1@mid.individual.net> <83baf3d8-c3b4-4b0f-8edc-5680002076e7@w3g2000vbw.googlegroups.com> Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 173.164.137.214 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1323791558 5685 127.0.0.1 (13 Dec 2011 15:52:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 13 Dec 2011 15:52:38 +0000 (UTC) In-Reply-To: <83baf3d8-c3b4-4b0f-8edc-5680002076e7@w3g2000vbw.googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10704 On Tuesday, December 13, 2011 4:33:07 AM UTC-8, Ilya Lakhmitski wrote: > If the computer is not in a WORKGROUP, the value can be NULL. it is > ok. In Java that's spelled "null". > The question is not what happens if something will occur, but how to > get the name of WORKGROUP using java [sic] for different operation system= s. Of course the question is what happens when something occurs. That's what = programming is - the creation of instructions to the computer to tell it wh= at happens (well, what to make happen) when something occurs. You should go back over the answers people have given you and assimilate th= em. That said, there is possibly a way to obtain a system descriptor from the O= S that tells the program whatever the OS happens to know about its network,= but as everyone keeps telling you, what you want is highly system specific= (as in, unique to a system). You would have to make a cross-platform syst= em call, determine from the answer that you do or do not have Windows, then= crack down to the level of Windows-specific information. Unfortunately for you, I do not know what such a system call would be, nor = do I care to Google it for you if you aren't doing so. GIYF. =00=00 I recommend that you consider carefully not, "How do I determine what WORKG= ROUP [sic] this node is in?" but, "What am I really trying to accomplish?" = Sometimes we get tunnel vision on a particular idiom when a different appr= oach actually would suit better. So what does having the workgroup buy you, and couldn't just knowing the IP= address (which tells you what sub-LAN you're in) give you what you need (a= nd in a cross-platform way!)? --=20 Lew