The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
March 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

thanks!

Posted by alan polansky on July 24, 2001 at 1:45 PM

Thanks!

> > > In the C world the call getservbyname() converts
> > > a service name into it's port number.

> I wrote a method to search the /etc/services file
> (or /etc/inet/services or c:\winnt\system32\drivers\etc\services).

>
> It is at
>
> http://www.dan.drydog.com/java/GetServiceByName.java

>
> This isn't a part of Java because someone apparently thought
> it's a system-dependent function.
> With all due respect, this is not a system-dependent
> function. The implementation may be (such as the location of
> the /etc/services file or whether it's a flat file or database),
> but the function can be implemented on any system.






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us