File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Socket constructor error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Socket constructor error" Watch "Socket constructor error" New topic

Socket constructor error

justin mcsporran

Joined: May 12, 2003
Posts: 15
When I compile the appended class, I get the following error:

The code is:

Thanks in advance for any help,
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451 does not have a constructor that accepts two Strings for host and port. It does have a constructor that accepts a String host and int port. So change


and it should work.

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
I agree. Here's the link:
subject: Socket constructor error
It's not a secret anymore!