I would agree if the goal is just to build a web app, however, if you want to run natively on multiple platforms, Java still has its good points. If you really run a particular app on a daily basis, it can be nice to have an option for a dedicated desktop app.
We may see more of this with WASM. And JavaScript can get a little unwieldy beyond 100k lines of code.