This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Problem with sockets example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with sockets example" Watch "Problem with sockets example" New topic

Problem with sockets example

Vladimir Vucetic

Joined: Jul 09, 2010
Posts: 10
I am trying to run example from "Head First Book Java" sockets chapter, but have no luck.
This should be server code project:

This shoud be client code project.

I first run server project and then run client but have no luck.
When I run server project error text is:

What is the problem here?
Vladimir Vucetic

Joined: Jul 09, 2010
Posts: 10
I am sorry it from some unknown reason start working. But I am not sure why that error occurred before
David Newton

Joined: Sep 29, 2008
Posts: 12617

This error is sometimes related to trying to open a port that's already open; it may just be that you already had an instance running.

Glad you got it working, though!
I agree. Here's the link:
subject: Problem with sockets example
It's not a secret anymore!