commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Katz <echo...@yahoo.com>
Subject Re: Connecting NNTP server
Date Fri, 19 Aug 2005 17:12:14 GMT
Try without the protocol:
...
client.connect("news.eclipse.org");
...

Halina Tam wrote:
> Hi,
> I am new to commons-net. I want to connect to a nntp server by using
> NNTPClient.connect(), such as:
> NNTPClient clinet = new NNTPClient();
> client.connect("news://news.eclipse.org/");
> client.authenticate("exquisitus", "flinder1f7");
> 
> But I always receive UnknownHostException:
> java.net.UnknownHostException: news://news.eclipse.org/
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
> at java.net.Socket.connect(Socket.java:452)
> at java.net.Socket.connect(Socket.java:402)
> at java.net.Socket.<init>(Socket.java:309)
> at java.net.Socket.<init>(Socket.java:124)
> at org.apache.commons.net.DefaultSocketFactory.createSocket(DefaultSocketFactory.java:53)
> at org.apache.commons.net.SocketClient.connect(SocketClient.java:162)
> at org.apache.commons.net.SocketClient.connect(SocketClient.java:250)
> at com.gsta.nntp.reader.NNTPReader.main(NNTPReader.java:29)
> 
> And there are three other ways to connect to a server, I dont know how
> to use them.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message