I was shocked, shocked when Oracle sued Google for patent infringement relating to the use of Java technology in the Android platform. The owner of Java using patents to shake down a large competitor that felt that it had to manipulate Java in order to meet its technology needs? Unprecedented!

Sun never mastered the trick of turning technological innovations into market share. Going back to the late 1980s, they were always the company that seemed to have the technology that was going to take over the world in just a few years. They had one of the first great development environments for programming and debugging large C applications, they had chip technology that seemed destined to displace Intel, they had beautiful graphics workstations, they had thin clients that provided a glimpse of “living in the cloud, and of course they had Java. Ironically, for a company that was focused on hardware, Java’s success was due largely to its availability on different server architectures.

I specify “server” architectures because Java’s success as a language for writing client applications has always been minimal. In the late 1990s, recognizing the success of Java but the lack of uptake for Java-based GUI development, Microsoft extended their version of Java so that it could easily interface with native Windows components, and so that it could use the “delegate” model for event-handling, which had been pioneered in Delphi and which eventually made its way in to C#.

Sun sued Microsoft, claiming that Microsoft’s extensions would confuse developers (locking them in so that their applications could only run on Windows), and having altogether nefarious motives. Sun ultimately prevailed and received a boxcar full of hundred-dollar bills, and Microsoft walked away from Java, creating C# and the .NET framework.

In recent years, recognizing the success of Java but knowing that it had to compete with the iPhone, Google created the Dalvik VM, which among other potentially infringing things uses a different bytecode language than Java’s. Dalvik’s also a register-based machine as opposed to stack-based, but as with almost all software patent lawsuits, the technical details of potential infringement have nothing to do with the choice to sue. Will anyone be shocked if Google suddenly discovers that some piece in Oracle’s software portfolio infringes upon one of Google’s many patents and decides to countersue?

It’s interesting to compare the reaction to the recent Oracle lawsuit against Google to the reaction to Sun’s original lawsuit against Microsoft. That was widely acclaimed as a principled stand against the Evil Empire, while Oracle’s lawsuit against Google has drawn widespread criticism. I’d like to think this is due to lawsuit fatigue—one would hope that everyone appreciates at this point that patent lawsuits play out over the course of years, during which time a cloud of FUD surrounds both parties in the case and, perhaps even more importantly, during which time evolution of the language is hampered by the lawsuit. The work hours of excellent engineers is bled off explaining technical minutiae to lawyers, and progress on the foundation technologies is slowed by a blinking red light reading, “Do not discuss or modify any technologies relating to the patent.”

Unfortunately, it seems that much of the commentary about the lawsuit comes from the same old naive belief that multibillion-dollar companies have moral perspectives just like you and me. Microsoft had achieved an OS monopoly, therefore they were Evil. Google has as a corporate slogan known as “Don’t be Evil,” therefore, Oracle is Evil.

Nonsense.

Corporations do not play by the same moral playbook as humans. (Of course, some humans don’t play by moral playbooks, but that’s out of scope for this article…) Corporations work in their own self-interest, always, and reneging on a promise is done without hesitation or apology. My favorite example comes from the realm of advertising, where it’s actually a legal defense to say that a claim is “mere puffery.”

Over the years, there have been claims that developing with this or that technology amounts to “sharecropping” and warnings against “walled gardens.” But if only you use this other corporate-sponsored but “open” technology, you’ll be protected from damage by arbitrary corporate policies.

I don’t buy it: If you want to be free, be free. Free as in beer, free as in speech, “free” in the full Richard Stallman sense. If you can make a living doing that, more power to you. But if you’re going to play in the world of commercial software, don’t give your heart to a corporation because you think they will act in the best interest of anyone but their shareholders.

The upshot is that if a corporation ends up pulling the rug out from under your feet only once in your career, you’ll be luckier than most developers. It’s natural to be angry when it happens, but it’s naive to be shocked.

Larry O’Brien is a technology consultant, analyst and writer. Read his blog at www.knowing.net.