Latest Publications

Classpath hell just froze over

Classpath Hell

The classpath is dead … that’s what Mark Reinhold (Principal Engineer @ Sun) said at a general session during JavaOne 2009. It’s the type of statement that should resonate with any of us who have been victims of classpath/jar hell. Mark announced this in the context of reviewing the new language features due to be released in JDK 7 (ETA 2010) or more specifically the new Java module system codenamed Jigsaw.

Module Systems and Jigsaw

Jigsaw is a low level implementation of a module system, which also includes some language and VM changes that are specified in JSR 294 (note that Jigsaw is being done outside of any JSR and is not a reference implementation of 294). Another implementation of a module system most Java developers are likely more familiar with is OSGi. But what is a module system and why do we need one?

Depencies on multiple versions (of module B in this example)

Depencies on multiple versions (of module B in this example)

A module system enables modular programming, it allows developers to separate code into clearly defined modules that can specify what other modules they depend on and their versions, can be internally modified without breaking other modules that depend on it and can hide its own internals from external modules.

A module system can solve the classpath/jar hell problem by leveraging the previously mentioned features in order to allow an application to use the right versions of the set of libraries it requires. In the diagram shown here, we have an APP module that depends on the A, B and C modules. But module C also depends on B, however this dependency is to a different version of B than the one APP needs. A useful module system would then allow us to have 2 versions of the B module, with the compatible version and implementation visible to the appropriate modules (in this case APP and C).

Also, by clearly expressing module dependencies, we no longer have to look at random lib folders or hidden documentation when using a 3rd party library, just so we can guess what the corresponding jar files are needed to run it. With the system implemented by Jigsaw, we can simply introspect the module and let it tell us what those dependencies are. It takes the guesswork and the dark magic completely out of the equation.

But back to Mark’s presentation at the general session. The main reasons to introduce Jigsaw into JDK 7 are the following:

  • Eliminate classpath complexity (classpath/jar hell problem already discussed).
  • Increase performance. The VM download size can be made smaller, and startup time should improve because for small programs (say HelloWorld) unnecessary classes don’t have to be loaded at all. Mark showed how he could run HelloWorld by only using 2 modules listed by the new jmod command; jdk.base@7-ea and jdk.boot@7-ea.
  • Enable native integration for installing modules.

(more…)

JavaFX Authoring tool demo at JavaOne 2009 (with video) – updated

javafx_authoring_tool

During this morning’s JavaOne general session, the “James Gosling’s Toy Show”, Tor Norbye gave another preview of the “JavaFX Authoring Tool” (TODO: Needs a cool codename!!!).

In 2007 when I blogged about the original JavaFX announcement at that year’s JavaOne, one of my first questions was about the tooling. At first we basically just had JFXPad to play around, then came more integration with Netbeans. However, these are not designer tools, and a RIA application needs more access points of people who are not software developers. This was partially answered with the JavaFX plugins for tools like Adobe Photoshop and Illustrator, but what was really missing was a visual place to bring content together interactively and created animated content.

(more…)

Is this the last JavaOne ever?

jonathan_javaone

I’ve heard this question asked quite a few times around the hallways of the Moscone Center this week.

There are no guarantees or definite answers, even Ellison didn’t really provide many details when asked (he probably can’t) but I think the answer is a definite no.

It is well known that Java is a big part of why Oracle is buying Sun. Ellison’s address to the attendees last Tuesday served to reassure the Java community that Oracle is not here to tear Java apart piece by piece. Quite the contrary, he seems willing to continue to invest in the platform.

But let’s remember that buying Java means more than making Sun employees your employees, or buying widgets. What Oracle is also getting in the deal is the Java community … no small incentive for a technology company. Removing JavaOne from the landscape wouldn’t make sense for Oracle since that could threaten goodwill and slowly erode the community and enthusiasm for the Java platform.

From the many college students attending this year, learning about Java for the first time (I’ve met 2 that say their Universities only teach C/C++) to the sometimes heated discussions about technologies and new language features (like the Modularity Q&A, oh boy, stay tuned for my blog post on that one!). A lot of these interactions are hard to do effectively without an event like this, where people can freely and dynamically regroup and discuss their ideas about the Java platform.

So no, I don’t think Oracle will “deprecate” JavaOne. Expect it to change of course, but don’t expect it to disappear and be merged with OpenWorld anytime soon.

BTW, this is likely the last JavaOne conference Scott McNealy will ever attend and he acknowledged that during his keynote. In a very emotional moment, McNealy said his last goodbye to the community at the conference … and from what I could tell even choked up a bit.

When he was done presenting, he was greeted with a standing ovation from the audience. Afterward, he hung around and took pictures with many of the participants.

I thought this was a nice moment, and I think the gesture from the audience was very kind. Whatever you say about McNealy, nobody can deny his passion and the trust he always put on his team, especially to his engineers.

with_scott_mcnealy

From left to right; Dan Salt, Scott McNealy, some guys with his eyse closed and me

So where is Oracle?

oracle1

Visiting the JavaOne pavillion yesterday at CommunityOne, one thing that stood out was the absence of Oracle. This year there is no Oracle booth, which is very unusual, and a lot of people are wondering what is going on with the Sun/Oracle merger which nobody from Sun is really talking about.

My guess is that due to SEC regulations they’re not allowed to talk about it. But I’m not an expert in that area so I’m wondering if anybody knows what the rules are. However, Larry Ellison just walked in front of us a few minutes ago so we might yet see an official announcement about Sun/Oracle this morning. My guess is we wouldn’t hear about it, but then why would Ellison be here if he’s not going to speak at the podium?

larry_ellison_at_javaone_201

(Sorry for the crappy picture, but there was no light, no flash and he zoomed by … most people in the audience don’t know he’s here … yet)

Update: As soon as I hit “publish” McNeilly stars talking about Sun/Oracle. Joking about rumors of course.

Update 2: “Don’t expect a lot of changes, just increased investment”, Ellison tries to reasure developers at this morning’s keynote. Ellison mentioned how Oracle pretty much uses Java everywhere for their products and he mentioned JavaFX a lot, plus interest in OpenOffice and mobile. For those wondering if Oracle was interested in the client side, I think Ellison has pretty much answered that very clearly.

Live blogging from CommunityOne

communityone

JavaOne officially starts tomorrow but today Sun has kicked off CommunityOne. Which is a more open source focused and free conference that precedes the bigger event.

The main theme this year is cloud computing. The presentation today has been about showing several vendor solutions in the areas of virtualization and large scale application deployment that is very easy to use (and graphical). To be completely honest, I think “cloud computing” is a big buzzword approaching marketroid levels, but there is some interesting technology here. I’ll be attending a few cloud computing sessions to see if I become one of the converted.

communityone_cloud

Currently, we’re listening to some of the folks from OpenSolaris and JavaFX in a setup that seems like a nerd version of David Letterman from an alternate reality.

BTW we got a small announcement that JavaFX is now officially released for OpenSolaris. Although I’m not sure there’s a large community of OpenSolaris users looking forward to that :-)

WolframAlpha is dumb

wolfram_alpha_is_dumb

Maybe I’m being a bit unfair, but the way the press is hyping it as a potential “Google/Wikipedia Killer” really doesn’t do it any favors. The site itself doesn’t say it’s a search engine, it describes itself as a “computational knowledge engine”. You’re supposed to enter a question or calculation and it will give you a result in the areas of mathematics, engineering, physics, places & geography, etc.

So first test is, can WolframAlpha tell us what a “computational knowledge engine” is?

Question: What is a computational knowledge engine?

WolframAlpha: Wolfram|Alpha isn’t sure what to do with  your input.
Google: Top link is a blog entry titled “So what exactly IS a computational knowledge engine?

Hum … not a good start. Also, Google’s second link is a link to WolframAlpha itself. Well, it says Wolfram Alpha is also good for business queries. Let’s find out information about a company.

Question: Who is the CEO of Apple?

WolframAlpha: Wolfram “assumes” I’m talking about CNOOC Limited, whose stock symbol is CEO. So the result is some financial information about CNOOC and Apple. Not what I was looking for.
Google: First link is Apple’s bio page on Steve Jobs.

Google wins again. Let’s look at historical figures. (more…)

 

WP SlimStat