This is an interesting comment. When you say "maintainable", I would agree but for different reasons. It would say a single owner for most of the ecosystem (Sun->Oracle) makes it exceedingly stable. (Yes, I know IBM has a parallel universe, but little used compared to Oracle's.) Think about it: A
single vendor provides the whole stack: compiler, debugger (including remote!), standard library (immense, well-documented), virtual machine, and IDE (NetBeans). There is also a small army of well-paid, highly skilled developers employed by Sun->Oracle constantly working to improve this ecosystem. Probably, the only thing they don't provide is a build system. They originally wrote Ant, but then let free in the wild. Also, no segmentation faults, full exception stack traces, and mature decompilation tools make it incredibly simple to debug -- even the hairiest legacy libraries. With the exception of Microsoft's C#/.NET, I cannot think of any mature equivalent. Note: Above, I never mentioned the open source community (Maven Central Repo, etc.). I won't touch that because the quality varies wildly.
And, yes, I agree 100% about your reference to low cost developers. From an enterprise view, it is cheap and easy to find (low quality and) low cost developers to maintain legacy Java software.
You also wrote: <<... static typing allows for deterministic refactoring of bad code. That's something you can't easily do in JavaScript.>> Most JavaScript devs would immediately reply: "Oh, use TypeScript for that." As I understand, you can incrementally upgrade a legacy JavaScript project to TypeScript, then slowly add types. Also, I have refactored lots of Java code that uses Object as a substitute for C's void*. That type of code is so difficult to understand without a debugger. Also, very difficult to refactor due to limited typing.