Java is possibly the safest bet on the future, it's open source both in spec and in the most common implementation (OpenJDK), and is so widely used that there are multiple FAANG companies critically dependent on Java working that alone could continue the development of the platform were anything happen.
Besides, Oracle has been a surprisingly good steward of the language.
It has similar bases on facts.
To this day Android Java is not fully compatible with Java proper, and Kotlin became Google's version of C#.
Plus last time I checked Oracle lost that lawsuit.