I have been using Java as my main programming language for about 7 years now. Before that I had used Java for hobby projects since its first release some time in the 1990s. The reason I switched from programming mostly C on UNIX to mostly Java in 2003 was the availability of asynchronous network APIs and a reasonably performant JVM. It also didn't hurt that Java is still the only language I can think of with decently designed collection classes. Later in 1.5 Doug Lea's cocurrency library also made it into the class library, which of course was nice.
These days a lot of things are conspiring against Java. The most obvious threat to Java is its new owners: Oracle. It is becoming ever more clear that the Java community as a whole would be better off if Oracle had not bought Sun.
When Oracle took over Sun I have to admit that I was mildly optimistic. Sun was perhaps one of the more promising companies from a technology point of view. But it doesn't help being "promising" when you are coming of age and you have not made it out of your mother's basement. Under competent management Sun would have leveraged its strengths and been the leading star in the cloud computing era. Instead companies such as that book-shop from Seattle are leading the way.
Sun's slogan used to be "The network is the computer", but what they lived was "the computer is the computer and it is an expensive computer very few people would want". Meanwhile they managed to realize exactly nothing in terms of being "the networked computing company". Funny that.
I was mildly optimistic because I thought that Oracle might provide the much needed leadership to make something of Sun. Unfortunately it turned out that not only are Oracle mostly concerned with shortsighted money-grabbing by hitting up Google for spare change, but they appear to be really terrible stewards of the Java community.
The one thing Java had going for it was a strong community -- bordering on the fanaticism usually associated with Apple technologies and products. That community is very confused these days. People are essentially asking themselves "is it over?". With some regularity Java luminaries are jumping ship. Just a few days ago Doug Lea announced he was not seeking another term on the JCP Executive Comittee. Before him, Gosling and others left Oracle.
It probably isn't "over". Likewise it sure as hell isn't "promising" anymore.
I am not sure if Apple decided to no longer ship their OS with Java pre-installed because of Oracle. Steve Jobs and Larry Ellison are apparently personal friends, so I suspect this may be a dig at Google, since Android is in fierce competition with iPhone. Jobs' friendship with Ellison and Oracle suing Google for the only successful use of Java on mobiles makes this a complex question.
Yes, I know that Dalvik is not a JVM, but to developers it doesn't make much of a difference. Yes, I also know that J2ME is probably on more phones than Android, but I said successful. J2ME has always been a piece of rubbish and I can not imagine that it will stop being a piece of rubbish any time soon.
An interesting side-note: the percentage of Java developers using Macbooks at conferences is disproportionally high compared to the market share of Macbooks. While desktop Java apps are not that interesting to me, it will be interesting to see what effect this will have on people who serve as key technology influencers -- ie developers and geeks.
In the short term I will still rely on Java as my main programming language, but I think there is reason to be concerned about the future of Java and to start looking for alternatives. With Oracle's non-stewardship of Java I would not make any long term bets in favor of Java.
Sure, Oracle may mend their ways, but Ellison doesn't strike me as the kind of guy who apologizes for behaving like a sugar crazed five year old. The guy lives in a replica samurai village, runs a company that "doesn't do employee appreciation events" yet has no problem setting fire to a metric fuck-ton of cash to fund his fondness for wind-propelled maritime toys. Java is his toy now and if he wants his lawyers and miscellaneous suits to use it as a slugger to hit his competitors over the head, then that is what will happen.
The safe bet is to start noting where the exits are.
Before we go on: forking Java is not really an option. We will end up with lots of incompatibilities and any target big enough to register on Oracle's radar will come under fire by hordes of patent lawyers and assorted Oracle trolls. Don't go there. Forking is not a long term solution.
One such exit may be Erlang. What little I have managed to learn about the language seems very promising. Now that CPU clock speeds have long since stopped being a scaling factor for performance, languages that have been inherently designed for concurrency become more important to utilize all those cores. I have to admit that I still know too little about any potential legal pitfalls that may or may not be associated with Erlang, but if there are any: now is the chance to learn from the Java adventure and make Erlang a safe bet.
I hope to get enough spare time to learn Erlang soon. Or better yet, if someone is willing to pay me to learn Erlang while building something in it.
I see .Net as a non-option. I have never had much faith in the Mono project and the .Net platform is always going to be intrinsically linked to Windows -- and Windows is the odd one out as far as operating systems are concerned. It is the last of the ancient, weirdo, oddball operating systems. The rest of the world is UNIX.
For those of you pushing PHP, Ruby, Python, Perl and miscellaneous scripting languages: no I am not going to bother explaining to you why these are not replacements for Java and the JVM.
Groovy, Scala and other JVM-bound languages also are not an option for more obvious reasons.
C++ and Objective-C are also not an option. I view these as by-products of the adolescence of OOP that should have been discarded as their use-by date expired, but which have unfortunately stuck with us like a bad smell since the days when the mullet was considered the epitome of cool.
And C? Be serious.