File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Socket Programming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Socket Programming" Watch "Socket Programming" New topic
Author

Socket Programming

nayomi gunawardena
Greenhorn

Joined: Sep 17, 2011
Posts: 6
Server Implementation



Client Implementation



is there any wrong codes?? Please help me to find out..Because this wont work..I want to make this work
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
What does "this wont work" mean? Blue Screen Of Death?
nayomi gunawardena
Greenhorn

Joined: Sep 17, 2011
Posts: 6
Server is executed entering the port as 20000 for args[0], then client is also executed in a separate cmd entering 20000 for args[1]..But an exception occurred
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Were you planning on letting us know what that exception is, or are we supposed to guess?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19696
    
  20

ItDoesntWorkIsUseless. TellTheDetails. You should start by showing the stack trace.

However, I've tried your server and client on my local PC, and it worked. Therefore, I think that there is a network issue; perhaps a firewall is blocking the connections.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692

nayomi gunawardena wrote:Server Implementation



Client Implementation



is there any wrong codes?? Please help me to find out..Because this wont work..I want to make this work

you could probably gettin exception because you would have used port which is already binded like 21 and and all
use port above 1024 or just go up like 6000 something port


The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Socket Programming