How can I create a server Socket with more 1 port runing at the same time??A little code review wud be more helpful...

Also I have to run 1000 java files simultaneously, bt every time I try that my virtual memory goes low on resources.Hw can I handle memory management in java???