Here are a few factors I would consider:
– Community support: much more for Java
– Learning content availibility: Java, since it’s the most popular language for automation
– Integrations: Java, most automation related open source libraries would interface with Java code
– Long term perspective: learning Java will create more career opportunities because of its wide use
You’ll never (or should never) get stuck with any one language. So pick the one that suits your current situation.