Imagine something totally different for a second. You're working at a software house making business applications for your users. You want your stuff to run everywhere, so you use Java on the server. Though you need to do some Office hackery, or maybe you wanna do some Windows specific Silverlight stuff or you've bought in to the MS hype about any day now the words really gonna go Rich Client so you better ditch Java and do .Net or else. So the .Net platform gets more tempting as a development platform to get all the MS crack.
So what do you do? Use Java and .Net and hire both .Net guys and Java guys then deal with rewriting code on both languages/platforms and training your folks on both stuff? Or have two different teams? Or just pick one standard language/platform/IDE etc. The temptation might be to go with more and more .Net - maybe even just .Net. And you know what - thats what MS want! To tempt you with all this Office / Windows / Silverlight crack so you stray from your nice open Java platform to be locked into this Windows / Office monopoly. They want you to leave the Java ecosystem and move over to the dark side.
However there's this thing called IKVM which is awesome - it effectively turns .Net into a Java Platform. Yes you read that right. You can take any Java bytecode and turn it into a normal .Net assembly of IL stuff and it runs like any other .Net thing. With .Net glasses on it looks just like .Net. However with your Java glasses on, its still standard Java code and it looks just like a Java platform. What IKVM does is take Java bytecode and translate it into .Net IL. For years its been able to run ActiveMQ (via Christopher Steen back in 2004!), Tomcat and yes, even Eclipse (think of all that native stuff in there for JFace, SWT).
Indeed with a bit of work (and particularly if Harmony and IKVM got together), .Net could actually get certified as a Java platform! Imagine that for a second. One of the main monopolies trying to tempt developers away from Java to lock them in to their proprietary windows/office platform could actually be a certified Java platform!
What would be really cool is if someone started to build open source APIs to abstract all the Windows / Office stuff using interfaces; so you could deploy on native .Net and use the real MS goodies - but folks could implement those APIs using open source or open alternatives like OpenOffice or Google Docs / Sheet or whatnot. i.e. remove the lock-in and reasons for switching to .Net.
I remember having a bit of a heated discussion with Graham Hamilton on this point at the first Sun Dynamic Language conference; his oppinion was that Java should remain 100% pure and be a single certified platform. I certainly see the value in this.
However another perspective to think of is the developer; and extending the Java platform to as many environments as is possible so that developers never have to leave the Java ecosystem even if they wish to develop on some platform which is not 100% pure and certified to run the "entire Java platform" - e.g. say you don't need AWT, Swing, RMI and CORBA. (Though now I work for IONA I now realise - CORBA rocks! :-)
As a developer in the Java platform ecosystem, its awesome to be able to use a Java IDE and tooling (with other languages for the JVM too like Groovy & Ruby etc) then deploy that same Java code on any certified Java platform plus these other huge platforms:-
- .Net via IKVM which also means inside Office / WCF etc
- inside any modern web browser without a JVM via JavaScript using GWT
- as a C library using gcj so folks in unix/c land can use your stuff
- on a mobile phone via Android on a platform optimised for phones
However today none of these are certified Java platforms.
Now lets talk a little bit about the "Java Platform"; its got a ton of stuff in there that noone really cares about any more. e.g. AWT / Swing is of no value to any of these 4 platforms I just mentioned. (I personally see GWT as a long term replacement for AWT / Swing / SWT)
The Java ecosystem is huge and diverse. IMHO core of Java (java.lang and java.util) should be separated out and made easily certifiable - say called the Java Kernel to indicate its the core language / VM only and not stuff on top like AWT/Swing/RMI/CORBA (that few folks care about any more).
Then we could say that any web browser with JavaScript, the .Net platform, C libraries and Android & mobile phones are all certified Java Kernel platforms; so there's not really any fragmentation like Richard thinks - and its a win-win for the Java ecosystem, extending the reach of the ecosystem to more and more places and further reducing the chances of fragmenting the Java ecosystems (since its not really a fork as Richard thinks - its just a smaller subset).
So I'm all for different platforms which might not support all of J2SE - but do support java.lang and java.util and the Java bytecodes - and I fail to see how tempting more and more folks to stick inside the Java ecosystem, whether its JRuby on Rails, Grails, Android, GWT or whatnot - is nothing but a good thing for the Java ecosystem and a very bad thing for the MS lock-in strategy.
While I'm on a long ramble - I thought I'd mention another of my long term irritations with this 100% pure approach. The Java platform (or Java Kernel platform :) should have amazing C integration for those rare cases when you really need it. There's a ton of great stuff available in native libraries only thats a total PITA to work with in the Java ecosystem. Platforms like Python, Ruby and .NET are still leagues ahead of the Java ecosystem at working with native libraries and sometimes you really need to. Of course we try to stick to 100% pure when we can but you know, sometimes the real world jumps in and we need to step outside the 100% pure mantra.
So in summary - I salute IKVM, gcj, GWT and Android - I hope more and more people figure out neat ways of expanding the reach so the same Java bytecode can run in more and more places than we previously thought possible.