Some notes on your java impl:
You really want to use a framework for handling the connections and threading,
its tricky in java.
Your current implementation creates 2 new threads on each connection which is
wasteful and very expensive.
For threading please see:
https://stackoverflow.com/questio
yeah, Java comes from a different school of thought/history etc, where most
things are done via frameworks and libs.
The idiomatic way of doing something in Java (imho) is to get an already
optimized lib and tested framework, and Java
makes this easy for you via many build tools like maven,grail