Today's Java is the lingua franca of the programming field: as a language, it's easier to learn than C/C++, reads more normally than Perl/Lisp, and is more professional to use than VB/PHP. Almost no one can't understand Java, so when explaining a concept, writing it in Java makes it understandable to everyone.
And as a platform, Java has an all-encompassing class library, an extremely optimized virtual machine, and deeply rooted open-source projects. The result is that no matter what you want to do, theoretically—and even 99% of the time practically—it can be implemented in Java.
In the moment I write these words, tens of thousands of lines of Java code are being born in the world. So if "no one uses it anymore" is the death line for a technology, then Java is clearly alive, and doing quite well; if "able to find a job" is the death line, then Java is even more full of life. I'm not clear about the domestic situation, but on any job-seeking website in Europe or America, searching for positions with Java as the keyword can easily show its dominant position, beating C++ and kicking PHP.
No one questions why it's alive; we take for granted that it's alive, just as I never question whether there will still be work when I go to work tomorrow—granted.
But in that case, we might as well say Java has achieved immortality. Because if you look through TIOBE according to the two definitions above, you'll find that no slightly well-known programming language (and the technology behind it) has truly died. Visual Basic is still alive, Delphi is still alive, COBOL is alive, Fortran is alive, and even FoxPro is alive.
As for even more niche examples, have you heard of the IBM AS/400 system? My last employer still uses it. The programmers who maintain it get ridiculously high starting salaries because twenty years of the company's core business logic are all in it—if it fails, everything fails. AS/400 is also alive.
So when I say "Java go die / is dead," what does "dead" mean? Very simple: no one loves it anymore.
The answer in this same section that rewrites Niemöller's poem is a perfect echo of Paul Graham's "of all the great programmers I can think of, I know of only one who would voluntarily program in Java": nine out of ten people who write Java do so "because work requires it"—the remaining one because they don't know anything else. Among all the motives for writing programs I can imagine, "because work requires it" is the most disheartening one.
Sacrificing the health of your prostate and spine, sitting long hours in front of the screen enduring writing programs in Java just to make a living—I think it's boring anyway. If you can still laugh, good for you.
And unless you've just time-traveled from 1995, you should be able to see that today's Java is indeed not that lovable.
In terms of language features, rather than saying it doesn't have any major problems, it's more accurate to say its problems already have many mature workarounds, such as static methods that cannot be overridden, superfluous checked exceptions, and half-baked generics. What's really uncomfortable are the features it lacks—I can say that struct, delegate, async/await, event handler, accessor, operator overloading support (well, this one isn't necessarily a good thing) and even type inference in C# are all missing in Java (or can only be implemented through third-party libraries that scratch the surface), not to mention true runtime generics. Individually, you'd think each point is nothing, but when all of them accumulate, C# becomes much more lovable than Java.
These features may eventually appear in Java someday, just as Java 7 finally got switch on strings and try-with-resources, and Java 8 finally got lambdas. But until they appear, you have to endure, along with the bloated, complex, and tongue-twisting technical maze of Java EE. And thanks to Oracle, you don't know how long you'll have to endure—as a reference, Java 8 is roughly equivalent to .NET Framework 3.0, and .NET Framework 3.0 was from 2006, when the largest player in the mobile phone market was Nokia.
By any standard, Oracle is not a company that improves tools with developers in mind. It's more hated by developers than Microsoft, which at least has the well-organized and detailed MSDN documentation library, the mediocre but constantly improving CodePlex open-source platform, and a bald fat guy sweating through his shirt on stage shouting "developers developers developers."
And what has Oracle done? Left MySQL on the roadside to feed the dogs. Kicked the OpenOffice development community out of the house. Absurdly sued Android.
So James Gosling resigning at the same time Sun was acquired by Oracle is called foresight.
No wonder everyone is competing to invent new languages on the JVM and port other languages to the JVM. It's just that these attempts are too scattered in their efforts, and none has been able to dominate the scene and give the Java community hope.
Our current situation is that no one has written Java ME since 2007; apart from a few IDE projects, the most famous program in Java SE is only Minecraft; Java EE and Android are the only two parts of Java that are still alive and kicking. Dalvik is a separate faction, so nothing to say there. The JVM on *nix is actually the only remaining cornerstone of Java as a platform. It never had a proper competitor before—either too immature or too insubstantial—and this situation continued until November 12, 2014.
And this is the answer to your question: Microsoft, whose CEO said more than a decade ago that "Linux is a cancer," now officially supports its core-value output platform running on Linux, and it's open-source and free.
All the service providers around the world that can sell you a virtual host running Linux suddenly became .NET host service providers overnight. People who don't love Java suddenly have a new choice: comprehensive documentation, good support, clear roadmap, strong community, easy-to-use tools, enterprise-level reliability, and the best part is that 90% of previous Java experience can be seamlessly ported over.
I've never said the results of this would be immediate. But thinking about how Java was once so pervasive—it even runs inside your SIM card, even today—yet might within my lifetime become the COBOL of 1973, makes me feel how impermanent things are. I believe existing Java systems will gradually become legacy code, and people will continue to maintain them only because they must be maintained.
New struggles will still arise. After all, a thin camel is bigger than a horse, and a group of rats can chew on a camel's carcass for quite a while—to alleviate the pain your delicate soul might suffer from reading that sentence, I admit that I'm just a flea on one of the rats chewing on Java (hmm? Actually you're not suffering at all? See, even you don't love Java)—this will undoubtedly be a long process. So if you're a new Java programmer, you don't need to worry about your career development. Unless humanity invents immortality technology, you won't live to see the day you can't find a job because you only know Java.
Even in the worst case, if you really can drive yourself into such a dead end, you might as well go into management early.
Finally, I didn't "shout" for Java to go die, because this isn't a declaration, nor a curse, but merely a conclusion drawn after observing the current situation. Of course, "go die" is hard to interpret without emotional coloring, just like when I type kill -9, it's hard not to make people think I hate that process. Although I really don't hate it. If I hate it, it's only for a moment.
Also, the kind of rhetoric that "great programmers only choose the tool most suitable for solving the problem, and don't argue about who's good or bad"—the first half is true, the second half is completely a myth. Not everyone is a pragmatist. There are plenty of great programmers who argue about which tools are good or bad. The people who say this need to read more.
Declaration of interest and disclaimer:
I'm currently a Java programmer. To be precise, when I'm writing code during my full-time job, 60% of it is Java, including EJB, JPA, JSF, Swing, and even GWT. The last time I seriously wrote more than ten lines of C# was eight years ago. I started writing this answer because I was bored waiting for a flight. I didn't expect to write this much. I'm not trying to convince anyone, so if you disagree, up to you.
Source: Zhihu