Since you think Java is the easiest language to implement sockets, I'd say give it a try. Simply start 5000 clients (make sure you can all end them automatically, otherwise you'll be up all night closing connections

)
I have never worked with sockets that have more than, let's say, 100 users on it, so I can't really tell you what would happen.
As far as I know there aren't any standard C++ classes that can create sockets. You might be able to find one on the web, or create one yourself using the iostream class, but it's gonna take some work.