Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #10704
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: WORKGROUP |
| Date | 2011-12-13 07:52 -0800 |
| Organization | http://groups.google.com |
| Message-ID | <19360385.2860.1323791557719.JavaMail.geo-discussion-forums@prnx7> (permalink) |
| References | <8f03213b-5a9e-40c5-b106-7f58a4398dae@t38g2000yqe.googlegroups.com> <WORKGROUP-20111213110233@ram.dialup.fu-berlin.de> <fa0b723a-d0d5-4ca7-9a67-293afca9fd47@a17g2000yqj.googlegroups.com> <9koul8Fhg9U1@mid.individual.net> <83baf3d8-c3b4-4b0f-8edc-5680002076e7@w3g2000vbw.googlegroups.com> |
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 systems. 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 what happens (well, what to make happen) when something occurs. You should go back over the answers people have given you and assimilate them. That said, there is possibly a way to obtain a system descriptor from the OS 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 system 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. I recommend that you consider carefully not, "How do I determine what WORKGROUP [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 approach 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 (and in a cross-platform way!)? -- Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
WORKGROUP Ilya Lakhmitski <ilya.lakhmitski@gmail.com> - 2011-12-13 01:31 -0800
Re: WORKGROUP Ilya Lakhmitski <ilya.lakhmitski@gmail.com> - 2011-12-13 02:12 -0800
Re: WORKGROUP Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-12-13 12:27 +0000
Re: WORKGROUP Ilya Lakhmitski <ilya.lakhmitski@gmail.com> - 2011-12-13 04:33 -0800
Re: WORKGROUP Nigel Wade <nmw-news@ion.le.ac.uk> - 2011-12-13 15:01 +0000
Re: WORKGROUP Lew <lewbloch@gmail.com> - 2011-12-13 07:52 -0800
Re: WORKGROUP Steve Sobol <sjsobol@JustThe.net> - 2011-12-13 13:36 -0800
Re: WORKGROUP Roedy Green <see_website@mindprod.com.invalid> - 2011-12-13 07:40 -0800
Re: WORKGROUP Roedy Green <see_website@mindprod.com.invalid> - 2012-01-04 17:27 -0800
Re: WORKGROUP Rajiv Gupta <rajiv@invalid.com> - 2011-12-14 17:15 +1100
Re: WORKGROUP Lew <lewbloch@gmail.com> - 2011-12-13 23:46 -0800
Re: WORKGROUP Paul Cager <paul.cager@googlemail.com> - 2011-12-14 02:01 -0800
csiph-web