Whatsapp didn't start with a J2ME app, they started with the smartphone versions first and later they provided J2ME versions when they had already significant market share.
The point isn't actually which came first, it is that they are ubiquitous. The difference between WhatsApp and Viber is that WhatsApp put far more effort in being on every possible platform, and for something that relies on network effects, that effort was worth it.
Whatsapp didn't start with a J2ME app, they started with the smartphone versions first and later they provided J2ME versions when they had already significant market share.