Java is just an old boring legacy swamp. Back from the days when nobody cared about devx.
Not even close to nodejs, even though js infra is far from perfect too.
But you can’t avoid the need to build hundreds of reused libraries when you build anything bigger than hello world.
It’s just some languages care about your comfort (like Ruby) while others - dont (like Scala)