Java has also suffered many internal squabbles. IBM loved the language but was always battling Sun. Its decision to call its wonderful IDE "Eclipse" was not warmly received by those at Sun, who never figured out the business world like the folks at IBM.
Through all of this and many missteps by Java's own creators, Java still proliferated, finding a fruitful home on the server and serviceable hold on the desktop. Every technology has to swim against political currents, but in Java's case it swam harder and further, proving it is often a good choice for the job.
Key to continued Java dominance No. 2: The magic of threads
One of the strengths of Java's virtual machine has always been its ability to juggle multiple threads with ease. The JVM is optimized for large, multicore machines, and it will often handle hundreds of threads without buckling. This flexibility is what attracts other languages to come up with cross-compilers and emulators, so they can run on top of the JVM.
This power is also what attracts many of the high-traffic websites. They can write code that runs on their desktops, then use much of the multicore power available on the server.
Ruby is one of the modern competitors to Java that attracted many converts to its cleaner, more English-like syntax. Yet when Ruby lovers need high performance, they turn to JRuby, a version that emulates Ruby in Java providing much better performance under heavy loads with many threads. The Sun engineers got something right when they sweated these details.
Key to continued Java dominance No. 3: Java as first programming language
Religions, armies, and nations thrive by building loyalty when the people are young. Java is the lingua franca for Advanced Placement Computer Science, and this means it is often the first language that students learn. This sticks with them, through the good and bad. When they learn new languages, they see strengths and weaknesses relative to Java. If they become converts -- many do leave the Java fold -- they still base their opinions on what they learned in that first class.
Java has many advantages for teaching computer science. Some programmers hate specifying the type for the data, often calling it "belts and suspenders" programming. That may sound paranoid, but it's a great way for beginners to learn what's going on inside the computer. Asking them to spell out the type of data gets them thinking about it. Then the compiler can catch their errors when the variables don't line up correctly.
Some of the trendiest languages have been moving away from curly brackets because maintaining them can be annoying. That may be true, but they're useful for new programmers who need to understand nested blocks. Curly brackets help the newbies unpack all that nesting.
There will also be some who want to push their own language, and in most cases, their pet language is more relaxed without the strictures and rules of Java. They have a good point, but they miss the fact that the simpler, cleaner syntaxes have their own dangers that become apparent later. Some find the belts-and-suspenders approach suffocating, but Java pushes better habits from the beginning. The neophytes can handle the relaxed and more dangerous constructs when they're better trained.
Key to continued Java dominance No. 4: (Close enough) cross-platform compatibility
Java wasn't the first language to target simple cross-platform compatibility, but it's been the most popular. That's not to say it's perfect -- a missing library or an incompatible version will crash the code. You can't take your latest JRE 1.7 code compiled for a desktop with gigabytes of RAM and run it on a Java ME phone. It's not that compatible.