Using Java to measure latency...
Does not sound very accurate.
That said, it allows companies to use cheap web developers to build (previously more pricey) desktop apps, so it's used everywhere now. It's good enough to make money, but obviously using the wrong tool for the job will make some aspects of the experience worse.
Since most consumers hate working with the buggy software on their computer anyway, the loss for a company in making it slightly worse by introducing delay is negligible.
That's the reason you won't see a Java-based pacemaker anytime soon.