Browsing Posts in java7

The Apache/Sun rift is well-known to most following the Java world. Apache has long demanded that the field of use restrictions be dropped.  There’s some consensus that the FOU clause actually violates the JCP’s charter.  I’m not a lawyer so I can’t really comment either way.  This has prevented Apache Harmony from certifying as a Java implementation and, at least in part, has led to the development of the Dalvik VM up on which Android based applications run.  A new article in The Register reports that talks between Apache and Oracle have started to break down and that should worry anyone who works with Java.

Java’s promise and value has long been platform portability.  Except for a few corner cases here and there, an application written in Java could run on any platform which had a JVM.  Even most of those cases can be mitigated if your application is written correctly.  With the rising popularity of “non-computer” computing devices (smart phones, tablets, etc.), Android has become an considerable presence in the industry.  Whether or not Google chooses to certify Dalvik as a JVM or not, it isn’t allowed to even try, really.  The Java JCK won’t allow it.  And that poses a real threat to Java.

The FOU restriction was added, in part, to protect Sun’s JavaME business.  This made business sense to a degree as that’s an enormous market.  Back when devices couldn’t support a full JVM, JME made a lot of sense.  That’s changing rapidly these days.  Personally, I think the days of JME are numbered.  I think Android is going to be a huge player in the years to come.  And it isn’t Java.  Already, dozens of times I’ve personally helped debug someone’s “Java” code only to find that the tried and true answer doesn’t apply because, surprise!, that code was actually running on an Android device.

The mobile market is already huge and it’s only getting bigger.  There’s little reason for Oracle to retain the FOU clause.  Oracle doesn’t need the JME market the way Sun did.  Opening that up will allow Dalvik, and others, to certify as a Java implementation and push Java into even more markets.  If Oracle fails to do this, it could ultimately end up ceding the mobile market to others.  I’ve long agreed with Apache that the FOU is unfair and violates the spirit (and probably the letter) of the JCP agreement.  Oracle should drop the clause as they’ve said in the past that Sun should.  Vendors who still need JME can still pay for it.  But, increasingly, JME is looking more and more anachronistic.  I see very little reason to protect it any longer and every reason to push Java in to more and more markets.

Update: Yes, in some ways I’m conflating Harmony and Dalvik.  They’re both emblematic of the larger issue.  The problem of the FOU and the viability of the JVM on an embedded device is the main point.  Please don’t get too caught up in the finer technical points.  I apologize for any confusion.

Disclaimer:  These opinions are my own.  I do not speak for any of the parties involved nor do I have any inside knowledge despite my employment at Oracle.  I am simply a passionate Java advocate expressing an opinion.

Java is dead?

Comments off

There’s been a lot said about closures both in favor and against the last couple of years.  The debate has raged on for what feels like an eternity.  But the semi-official announcement at Devoxxx recently that closures won’t be making it into java7 seems to have put everyone back on their heels a bit.  I, for one, am relieved at the announcement.  Others are not so thrilled and have gone so far as to declare that Java is dead for their lack.  Personally, every major proposal out there made my eyes bleed.  There were so many gymnastics being proposed to deal with typing and generics and backward compatibility and the like that most of those proposals just made a mangle of the language.  I did see one idea that I like (my thoughts on that here) but there’s little chance it’ll get any serious traction.

I’ve used closures in both my fan work and my groovy work and I’ve enjoyed using them.  But the syntax employed is much simpler than what the main proposals had offered.  As nice as closures are, inner classes have served me well enough so far with very little heartburn.  Until Sun is ready to break with older versions of Java, I’m just not sure how well closures will work the current language and VM constraints.

What I was happiest too see was Mark Reinhold’s jigsaw project.  A small, modular, independently updatable runtime would be fantastic.  I know many are upset at the lack of any major language changes being promised in java7 but I’d rather see what we have now work better.  Let’s not destroy the language trying to shoehorn in things that just aren’t working out.

Powered by WordPress Web Design by SRS Solutions © 2010 Antwerkz, Inc. Design by SRS Solutions