Only for small stuff, if you have a 100k lines project you are absolutely unable to maintain it while staying sane.
On the other hand, it's impossible to scale Java down to the point where it would be sensible choice for what would otherwise be a bash script.