Seems to me you don't understand much about socket communications.
Programs don't create ports, they open sockets on ports. That's easy enough to do in Java, any book on network programming in Java will tell you how (and you'd better study such books as otherwise you're in for a load of performance and security problems no matter what programming language you use).
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
There's like 65000 ports(if I remember correctly) to choose from, but remember to be careful about selecting one that doesn't have major process running.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20