Sponsored Link •
There have been many calls for open sourcing Java, but that would mean letting go of the requirement for implementations to pass the compatibility test. How important is binary compatibility to you?
Peter Yared recently posted an open letter to Johnathan Schwarz asking why Sun doesn't open source Java. He writes:
The "P" languages in LAMP — PHP, Python, and Perl — are all open source, and each provide their own virtual machine. It would be ideal if the Java JVM was open source so that open source projects like PHP could join up with the Java Virtual Machine.
Later he says:
Can you guys let go a bit and let us all share a single, open source virtual machine?
I don't quite understand this thinking. Does Peter Yared believe that if Java were open source, the P languages would converge onto a single VM, the JVM?
I can run Python code right now on the JVM with Jython. I have wanted to use a scripting language on the JVM on several occasions, for example, for tasks such as writing tests. I haven't done so yet because I have such good IDE support for writing and refactoring Java code. Were I to use a JVM scripting language such as Jython, JRuby, or Groovy, I would today at least lose the nice refactoring support enjoy in my IDE with the Java language. On the other hand, when I want to write an independent script (one not involving any Java API), I write it in Python or Ruby. When I write a Python script, I run it in CPython—the standard Python, runtime, which is written in C—not Jython, because the JVM takes a longer to start up than CPython.
Yared also suggests that if Sun were to open source Java, it would make Java more competitive with Microsoft's .NET:
Java would be much more competitive with .Net, which supports numerous languages out of the box."
Combining two of the three leading development platforms [meaning: combining Java and LAMP] would make them both more competitive against .Net.
First of all, you can already run many languages on the JVM. I have yet to use any language on the JVM besides Java, because as I mentioned previously, whatever benefit I might gain from the non-Java language hasn't been enough to overcome the loss of refactoring support in my IDE. I would welcome more refactoring support for non-Java languages in Java IDEs, but that certainly wouldn't require Java to be open source.
Moreover, I don't understand what Yared means by "combine" when he suggests open source Java would lead to the ability to combine LAMP and Java. (LAMP refers to the open source technology stack of Linux, Apache, MySQL, and open source scripting languages such as PHP, Python, and Perl.) The page you are looking at was served up by Apache and Tomcat working together on Artima's server, running on Linux. Come to think of it, I also use MySQL and several Python and Perl scripts on that server, all of which work together just fine to bring Artima to the world. So I'm already able to combine Java with all four letters of LAMP quite easily.
A more sensible justification for open sourcing Java that I've heard expressed by others is that it would make it easier for people outside of Sun to contribute to the technology. Sun has tried to open the process to make it easier for outsiders to contribute by creating the JCP and, more recently, by making early access releases available through java.net and reaching out to the community for feedback. But there are still barriers with this approach that may indeed make it harder to leverage the full potential of the community compared to an open source approach. Even if that is true, however, I think that cost is worth paying because in exchange the community gets binary compatibility.
As I understand it, one reason Java cannot be considered OSI-certified open source is that Sun requires an implementation to pass the Java compatibility tests before it can be called Java. I think that's a good thing. There is a ton of innovation going in the Java community, both open source and commercial. That innovation is made possible because at the core of the community there are a few well-defined, well-enforced standards. In addition, those standards have unleashed a vibrant economy of products all of which seem to work together pretty well, and that compatibility very important to me as a consumer.
What is your opinion on open sourcing Java? To what extent do you think the binary compatibility we enjoy today would be threatened by open sourcing Java, and how important is that compatibility to you?
|Bill Venners is president of Artima, Inc., publisher of Artima Developer (www.artima.com). He is author of the book, Inside the Java Virtual Machine, a programmer-oriented survey of the Java platform's architecture and internals. His popular columns in JavaWorld magazine covered Java internals, object-oriented design, and Jini. Active in the Jini Community since its inception, Bill led the Jini Community's ServiceUI project, whose ServiceUI API became the de facto standard way to associate user interfaces to Jini services. Bill is also the lead developer and designer of ScalaTest, an open source testing tool for Scala and Java developers, and coauthor with Martin Odersky and Lex Spoon of the book, Programming in Scala.|