aspose file tools*
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

Win a copy of Java 8 in Action this week in the Java 8 forum!
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
Similar Threads
Make it in Applet, please.....urgent please....
Accessing FTP Server using Java
Relay access denied
Chat At Server Part Both write and read at the same time?
the max number of clients to multithread the socket server