IMO the real reason why Java never took off on the desktop is because making a cross platform Java app is pretty easy but distributing a cross Java platform app is super hard. There’s all these situations that you have to account for, there’s no de facto way of doing anything, and you’re basically on your own finding a solution that fits your app. On top of that, you have to distribute the JVM and licensing for that used to not be that clear cut.
Literally the only obstacle to any language being on the desktop is the lack of someone creating a reliable, well-supported, cross platform, and easily licensed distribution method for that language.