Java for everything. My apps run on Nokia 3310, browsers, servers, on the latest Android or anything in between.
Java was invented to run on tiny decentralized embedded devices no matter what CPU or operating system gets used.
To build things that grow in scale and complexity, it works beautifully (love the debugging features).
Bad java developers give it a bad reputation and write bloat. There is a really good platform outside the bad frameworks for building stuff that lasts.
You're absolutely right. Java can and should be used that way. Culturally though, the average Java programmer will tend to bloat things, at least that is my experience over the years.