Well, if you only have a nice academic abstraction in a book which is the language ... sure, that's awesome and all.
And then in the real world the platform, and its many variations, becomes an issue.
It's been years since I wrote in Java, but we'd get the regular updates of the platform, which may or may not have broken something. You'd get every vendor having their own JVM, or their extensions.
So you'd write a webapp for one platform and test it, and then someone would cram it into yet another proprietary variant which wasn't compatible. Which usually left the customer screeching that when you listed the platforms you supported, that it didn't work on the one they had which you'd never tested against.
And don't even get me stared on the shitware which Java wants to install now. Sorry, Oracle, but we don't give a fuck about your stupid Ashole.com toolbar.
So, yes, maybe in some perfect little bubble which doesn't depend on the platform Java is an awesome language. But in the real world, it seems like many things were a moving target, and that the platform gave you more sources of grief than the language.
I've lost count of the number of applications I've seen which the vendor basically says "we are compatible with this version of Java, and nothing else".
In that regards, as much as I like the actual language ... the platform can be a pain in the ass.
I don't know what it's like now (as I said, haven't directly used it in years). But there was a time when there was so much fragmentation as to make the "write once/run anywhere" a really bad joke.