I'd put choice of language third. Though obviously it depends a lot on the platform / application.
Microcontroller with no OS, embedded OS, desktop apps, server applications, web stuff, setboxes, routers etc.
The most important thing is the attitude and quality of the programmer.
Then sensible management.
Though I have a preference, in many cases the language is not something the programmer chooses. Many use cases are unsuitable for my "favourite" languages. I hate web programming more than any language to do it. I counted six "languages" in use in the same file, if you count HTML and SQL as "programming". No sensible way to have aid of a compiler's sanity check.
Compared to that, arguing the merits of Java vs C# (MS concept of Java), C++, etc is pointless.
Though I'd point out that Java can be used (and has been) for TVs, Setboxes, Windows/Mac/Linux desktop, phones, servers as well as Web applications. Anyone use PHP for anything other than Web?