Java in The Land of Make Believe

Steve Anglin, the Java Editorial Director for Apress, in Java GPL’d: Who really cares?:

Open source Java already exists in frameworks and tools like Spring, Seam, Struts, Eclipse, Tomcat, JBoss App server, and many, many more. In the most practical sense to developers, etc… open source Java has been around for a few years now in a very practical and adoptive way.

I sometimes imagine an alternative universe where Java is actually practical. I call it, The Land of Make Believe. Let’s contrast this fictitious universe with the one I currently inhabit, The Real World.

In The Land of Make Believe, here’s how you install Java™ on FreeBSD:

# portinstall java/jdk15

That’s how everything is installed on FreeBSD. There’s no manual downloads, “installers”, EULAs, or barrier to convenience and automation elsewise.

The Real World is slightly different in that you install Java™ like this:

# portinstall java/jdk15
** Port marked as IGNORE: java/jdk15:
Due to licensing restrictions, certain files must be fetched manually.

Please open http://www.sun.com/software/java2/download.html
in a web browser and follow the "Download" link for the
"JDK 5.0".  You will be required to log in and register,
but you can create an account on this page.  After registration and
accepting the Sun Community Source License, download the
SCSL Source file, jdk-1_5_0-src-scsl.zip and the
SCSL Binaries file, jdk-1_5_0-bin-scsl.zip .

In addition, please download the patchset, bsd-jdk15-patches-3.tar.bz2, from
http://www.eyesbeyond.com/freebsddom/java/jdk15.html.

Please place the downloaded file(s) in /usr/ports/distfiles 
and restart the build.
  
*** Error code 1
  
Stop in /usr/ports/java/jdk15.

What that error message basically translates to, for a huge number of developers and admins who appreciate their time and sanity, is that Java will not be installed. It just destroys the single greatest advantage provided by modern Linux and BSD: the package management.

Here’s how you install Java™ on RedHat based distros like Fedora and RHEL:

# yum install java

This will indeed install something that runs most Java programs in both The Real World and The Land of Make Believe but the similarities end there. In the The Real World, the GNU Compiler for the Java Programming Language (GCJ) and its extended runtime GNU Classpath are installed. These Java clones exist for exactly one reason: Java’s license is impractical. Those living in The Land of Make Believe will have never heard of these projects; Sun’s compiler and runtime are installed instead.

In The Real World, installing Sun’s Java on RedHat based systems works like this:

  1. Using a mildly annoyed tone, post a message to the fedora-general mailing list asking what makes Sun so special that installing their stuff should require hopping outside of established process.

  2. Enjoy the history lesson and observe that absolutely no one working at this level thinks that Java’s license is anything other than completely insane.

  3. Follow provided link to JPackage and admire the number of packages these guys have put together.

  4. Ponder how many packages may have been available had installing them been practical.

  5. Ponder how many projects decided to not use Java specifically because they would be this hard to install.

  6. Get setup for building nosrc RPMs.

  7. Learn how to rebuild packages.

  8. At last, install a JDK (this requires another 3 steps of clickity-click-click non-sense, mind).

If you want to get on the bad side of software developers and system admins, the fastest route is to waste their time.

In The Land of Make Believe, the whole idea of “installing Java” is kind of silly. It is installed “out of the box” like C/C++, Perl, Python, Ruby, and other general purpose languages. The reason is that some piece of the base system was written in it. In The Real World, Java is simply not an option for these pieces because it’s impractical.

In The Land of Make Believe, new GNOME applications are often written in Java instead of C#.

In The Land of Make Believe, projects like Jython and JRuby were considered stable and viable alternatives to their C language counterparts a long time ago because running Python or Ruby programs on top of Java would have actually been practical once the language implementation was complete. In The Real World, these projects are mildly useful if you want to add “scripting” to a Java application.

In The Land of Make Believe, the web is dominated by Java because Java is not only technically capable of running everywhere, it actually does run everywhere. In The Real World, the web is dominated by Perl and PHP.

In The Land of Make Believe, nobody really cares about GPL’d Java. In The Real World, nobody really cares about GPL’d Java either, but it has nothing to do with it going GPL.

From my perspective, the GPL puts Java back in the race for potentially useful technologies over the next decade because it makes it possible for Java to stop being such a massive pain in the ass. Whether it reaches that status is yet to be seen but I care about the fact that it is now at least possible.