What is the current situation of using Java (from legal standpoint)? In open source and in commercial setting? Oracle has a lot of fantastic technology locked up in Java (things like Truffle), how reasonable it is for new projects?
OpenJDK is pretty much open and straight from Oracle.
If you don't like Oracle (and I wouldn't blame you), there are alternatives from parties ranging from the Eclipse Foundation to Microsoft and Amazon that will do the same thing.
As for new projects, Java is here to stay. It's longevity is part of why companies are still using Java 8/11; once you write it, it'll run pretty much forever.
The language lags behind in terms of features compared to pretty much any competitor, but it's functional enough to get anything important done.
I'd personally go Kotlin if you were to rely on the JVM (almost entirely because Java still lacks nullable types which means nullpointerexceptions are _everywhere_) or C# if you don't like the Kotlin syntax, but Java is Good Enough.
Note that the previous Java LTS release license reverts to the OTN license one year after the new Java LTS version is published, making it no longer free, assuming you keep up with the security updates. See the license note on the Java 21 LTS version[1].
The UPL is an OSI-approved open source license. It shouldn't be a problem to use in any setting, but you should check with your legal team to see what licenses are approved.
I don't disagree (it is gpl licenced after all)- but it's worth keeping in mind that openjdk is still provided by oracle, too.
And all the other variants ultimately just repackage it. So if oracle doesn't care about destroying the Java IP, it definitely could cut everyone off from updates going forward.
I don't think they'll do so however, MySQL is still freely usable too, right? And that's oracle IP too.
Might change if they ever get into financial troubles, but that's the same issue with all languages and frameworks.
Amazon Corretto and Eclipse Temurin are developed and licensed by Oracle. They are just packaged and distributed by Amazon and IBM respectively. If you report an issue against them, the Amazon/IBM people will forward the issue to us at Oracle to resolve.
BTW, I don't dispute that Oracle is greedy, but I find the suggestion that Amazon, IBM, Google, MS etc. are any less so laughable.
Honestly, Java is one of those technologies I would never worry about in this way.
It is used everywhere. Just among the faang companies, Apple, Amazon, Netflix and Google definitely use it at scale, and they're just the tip of the iceberg. Taking away JVM updates would almost be a company-ending event for them, and they definitely have the resources to keep it alive if Oracle ever dies.