Saturday, March 28, 2009

Is IBM (IBM) Deal To Buy Sun (JAVA) In Trouble?

Inevitably, when a corporate buy-out is announced or rumored, the target company’s stock prices trades up to the level of the value of the deal.

Last week, there was news that IBM (IBM) was likely to buy Sun (JAVA) for about $10 a share. Sun’s stock jumped from under $5 to almost $9 in one day. But, since then Sun’s shares have been moving down. They closed the week at $7.83, well below the rumored purchase price.

There could be several reasons that IBM has either lost interest in Sun or is considering lowering a purchase price. One is that Sun has lost money or broken even in several of its most recent quarters. In the periods when the company did make a profit, it was modest. It may be that IBM has discovered that the next several quarters look weak for Sun.

Alternatively, IBM may have found out the the value of Sun’s customer contracts going forward are not as strong as it may have initially believed. Sun may be losing market share to larger competitors like Hewlett-Packard (HPQ). If Sun’s piece of the server global server industry is dropping rapidly, IBM may be considering walking away from a transaction or lowering its offer.

Whatever the reason, the fact that no deal has been announced is not good news for Sun.

Monday, March 9, 2009

JSR 223: Scripting for the Java Platform

We have all heard heated arguments between developers who use scripting languages and developers who use Java. One of the reasons for the war between these two factions is that the process of integrating the two was so difficult that developers on both sides were almost forced to choose one or the other. Java Specification Request (JSR) 223 addresses this issue. In this article, I present examples of how the standard framework and API defined by JSR 223 makes it easy for Java programmers to take advantage of the benefits of using a scripting language while retaining the benefits of using Java.


The Scripting API

The entire scripting API is contained in the package javax.script, which was first delivered with Java 6. This lightweight package contains six interfaces:


Bindings
Compilable
Invocable
ScriptContext
ScriptEngine
ScriptEngineFactory

five classes:


AbstractScriptEngine
CompiledScript
ScriptEnginemanager
SimpleBindings
SimpleScriptContext <.ul>

and a single exception:


ScriptException

Rather than describing each of these interfaces, classes and exceptions, I present a series of five Java programs and five scripts in three languages to show just how little effort is required to make them work together.