Java’s FATAL Flaw – BLOAT!

Brian Frank is DEAD on: (and my new Java hero).

So today we have the JAR, which is effectively just a convenient way to bundle up a bunch of classfiles, not much more. Yeah JARs are far from perfect – but at least they are something. Why weren’t APIs like AWT, Swing, and CORBA designed as separate JARs? Why wasn’t some flexibility built in to make more of these auxiliary APIs optional (which probably would have lead to a real JAR dependency system). Why wasn’t a more modular architecture pursued?

To be fair, Sun did kind of understand this problem. But in my opinion, their solution was the worst mistake they made with the Java platform. Instead of solving the problem with a true module system, they proceeded to create three editions: J2ME, J2SE, and J2EE. Each of these editions would be a monolithic platform with a required set of APIs.

Seriously this needs to be fixed! If it isn’t fixed with the Open JDK I’m forking.

Back in the JDK 1.1 day I really wanted to backport features from Java 1.2 but was prevented from doing so due to the fact that the entire VM is monolithic.

To add insult to injury Java prevents you from loading a java. package from outside the core rt.jar (at least last time I checked).

What’s odd is that I’ve been planning on writing this article for the last few years. Brian just nails it so this saves me a lot of time.

Sometimes it pays to procrastinate!

  1. They’re working on it. See the Consumer JRE effort and you can definitely load java. packages from outside of rt.jar by using the bootstrap classpath flag.

%d bloggers like this: