Hi all,
I'm having trouble with the "DailyAdviceClient" example in Head First chapter 15.
I've typed in the example as shown below:
When I run this I get the following exception:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Metho
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.
at java.net.PlainSocketImpl.connectToAddress(PlainSock
at java.net.PlainSocketImpl.connect(PlainSocketImpl.ja
at java.net.SocksSocketImpl.connect(SocksSocketImpl.ja
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:180)
at DailyAdviceClient.go(DailyAdviceClient.java:9)
at DailyAdviceClient.main(DailyAdviceClient.java:26)
Obviously my socket connection has been refused.
Why is this?
Have I coded this incorrectly?
Is this server no longer valid? - after all the book was written a few years back.
I've had a quick Google and a search on JavaRanch and found no relevant references. I'd appreciate any inputs.
Regards and thanks.
Phil