[J3 Computer Technologies - http://www.os2store.com/]

My Turn: Java and OS/2- by Dan Porter

This commentary is a response to an article by Brad Wardell that appeared last month in OS/2 e-Zine!. Dan Porter, the president of InnoVal, an OS/2 and Java software development firm, offers a different perspective.

Java: the future?

Can you name three OS/2 applications? If you use OS/2, that should be easy. Now, can you name three Java applications? Most people can't.

For the past two years, the press has been carrying prophetic articles about how Java will become the most significant programming language for developing software. IBM has made it clear that Java is fundamental to its future plans for OS/2. Some see it as the necessary catalyst to strengthen OS/2's position in the marketplace; even as the agent to save OS/2 from becoming a small niche, eventually obsolete, operating system. Many in the computer industry see Java as a means for breaking Microsoft's Windows stranglehold.

You have undoubtedly heard or read the slogan "write once, run anywhere." It is the theme of full page ads from Sun Microsystems that appear repeatedly in the Wall Street Journal and many other publications. Sun is running eight-page ads in computer magazines and 30 second prime-time ads on the major television networks. IBM talks frequently of its commitment to Java. The Borders Bookstore in White Plains has 70 feet of shelf space dedicated to books on Java. According to JavaSoft, a division of Sun, there are over 400,000 programmers writing Java programs. Every month, in some major city, there are well-attended Java expositions. There is a lot of excitement about Java in the press, on the Internet, in corporate information technology departments, and among individual computer professionals.

The excitement stems, in part, from the fact that Java is both a programming language and an operating environment for multiple operating systems including OS/2, Windows 95, Windows NT, MacOS, AIX, and SPARC Solaris 2.3. It also stems from the fact that Java implements the object-oriented programming concept in a practical way that allows faster application development at reduced cost. Java also includes a very strong security model that is essential in an increasingly inter-networked environment. This includes safeguards to reduce the possibility of malicious code or code that compromises the user's private data.

To some, who perhaps do not understand the underlying technology of Java, nor appreciate the nature of the software marketplace, all the talk about Java may sound like hype. It is not.

I characterize it as realistic promise: the commitment of companies such as Sun, IBM, Hewlett Packard, Netscape, Oracle, Symantec and many others to advance the technology and enable the marketplace. Hundreds of companies, large and small -- companies such as IBM, Lotus, Corel, Oberon, and InnoVal -- are developing Java applications. The work being done with Java probably eclipses anything being done by Microsoft to maintain Windows' dominance. In fact, Microsoft has found that it must defensively embrace Java technology. At this time, the Redmond, Washington, company is only a minor player in the grand scheme of Java.

Applets and Applications

If you browse the web at all, you have probably encountered Java applets. You can think of an applet as something intended to be run in the context of a web browser and usually tied to a specific web page. An application, on the other hand, is designed to be able to run outside of the browser context.

There is an example of an applet on the Best of OS/2 web site that scrolls messages across the top of the page. Other applets try to attract attention with wavy words, bouncing text, marquees with moving lights, and so forth. There are few applets that contain useful function. Applets, today, are not unlike the very early programs that came with the first release of DOS for the original IBM PC. I remember when I bought my first computer, it came with a mortgage calculator program. I ran that program over and over until I was bored with it. Most applets are still toy-like, as were those early DOS programs.

Java is only two years old. Still, with all the people working with Java, with all the interest, and with all the benefits, why don't we have any substantial Java applications and useful applets? The problem is that Java was not viable for robust applications until February of this year. That was when release 1.1 became available for Windows 95, Windows NT, and Solaris. (IBM's release 1.1 for OS/2 -- technically 1.1.1 -- is currently in beta and is expected by September.) The prior releases of Java, which supported applets in web browsers, were adequate for applets but not for high-performance applications. This fact is the main reason that there are still so few Java applications.


I was excited when Corel released a beta version of Corel Office for Java. Finally, I thought, we are going to see a "real" cross-platform application, including a word processor, that I can run under OS/2, 32-bit Windows, and other platforms.

But when I tried it, I was disappointed with the slow performance. I had heard that the newer releases of the Java Virtual Machine (VM) were much faster than the version I had on my system (release 1.02), so I downloaded the new VM for Windows 95 and the beta VM for OS/2. As far as I could tell, Corel Office was still just as slow. Because I didn't understand the meaning of the claims of increased performance, I mistakenly assumed that Java was just too slow for heavy-duty applications.

One of our programmers at InnoVal set me straight on the performance issue, though. Java 1.1 is much faster than the previous (1.02) release, but only if the program is written to take advantage of certain features of the new release and compiled with the new compiler. Corel's beta was written for the older release. (It will need to be extensively modified before real performance improvements can be realized.)

Part of the problem is that window-based (GUI) programs are event intensive. When you move a mouse pointer, you generate "mouse-moved" events. Move a mouse pointer across a screen with a 640 by 480 resolution, and a minimum of 640 events are generated. A click of a mouse button generates a "mouse-down" and a "mouse-up" event. Keystrokes similarly produce multiple events. Every event must be considered and either logically handled or ignored. If events are not processed in the most effective way, the program will run slowly.

That was the major problem with release 1.02. Release 1.1 handles events more effectively but, again, source code must be modified to take advantage of the new approach. (The old way still works, but more slowly.)

Not convinced, I had to see this for myself. So I wrote a small program that would act on every "mouse-move" event. The program loads a full-screen GIF image into memory and paints it to the screen. Then, every time the mouse is moved from one pixel to the next, the brightness of the color of the pixel under the mouse pointer is calculated and the pixel is changed to a shade of gray of the same brightness. Then the entire image is repainted on the screen, even before handling the movement of the mouse to the adjoining pixel. In other words, I created a "paintbrush" program that converted a color image to a grayscale image as I moved the mouse.

Coding for the older event model in release 1.02, I found that the program could not keep up with rapid mouse movements. This was true even if I ran the program with the newer release of Java. After rewriting the program for the newer event model, however, I found that the program kept pace even with very fast mouse movements.

In short, when developing a Java version of the Post Road Mailer, we have tested numerous capabilities of Java. I can say, confidently, that Java performance is, perceptibly, very fast when written to the release 1.1 specification and run with Sun's just-in-time compiler. Some functions, such as sorting large arrays and complex math calculations are slower, but not significantly.

Other problems and solutions

Another factor that has delayed the development of Java applications is the lack of comprehensive development environments for release 1.1. Within three months, however, we can expect to see several tools in the marketplace. IBM, this month, released VisualAge for Java (OS/2, Windows 95/NT) and VisualCafe from Symantec for Release 1.1 (Windows 95/NT only) is expected before the end of July. Up to now, many companies have been forced to write most of their code in a simple text editor and compile it with JavaSoft's Win32 compiler. Debugging is almost impossible and GUI layout is time consuming. Nonetheless, good progress has been made because Java is such a powerful language. Better progress will be made soon, now that adequate tools are becoming available.

By yearend, when asked what Java apps you know of, you should be able to name Corel Office for Java, Post Road Mailer for Java, and several other Java applications.

Also by yearend, there will be several important enhancements to Java as well as numerous other development tools. These improvements and new tools will propel Java into the mainstream. The most exciting development to be delivered by yearend will be the HotSpot Virtual Machine developed by Longview Technologies. This new VM, planned for release 1.2, will provide exponential speed improvements over Release 1.1. Early reports from JavaSoft suggest that Java code will run at close to the speed of native C++ code. This will virtually eliminate any performance issues, particularly for graphics intensive and compute-bound applications.

In addition, the foundation for GUI components, known as the Abstract Windows Toolkit, or AWT, will be replaced later this year by the Java Foundation Classes (JFC). Developed jointly by JavaSoft, Netscape, and IBM's Taligent subsidiary, this will significantly expand the GUI options for developers and leapfrog the component models found in OS/2 and other operating systems.

The Java Platform for the Enterprise is also expected to ship by yearend. This platform will include the Java Database Connectivity (JDBC) API, an interface to CORBA objects, and the serverlet API for server-side Java applications.

Where Java is going

As an ISV, I have concluded that as tools become more readily available and the performance is improved, developers will be able to deliver reliable code faster than can be done with C and C++. Because such software will be multiplatform, it will expand our market and lower costs which benefits our customers. If you consider that the major release life-cycle of a typical desktop application is just over two years, and if you believe, as I do, that Java will become the dominant programming environment, it is easy to see that Java applications will replace existing applications quickly. I think that we should see a significant turn from Windows development to Java development within a year and an end to Windows' dominance within three to four years.

Java will level the playing field for OS/2, as it will for other operating systems. To really succeed in the marketplace with OS/2, IBM must deliver on the promise that OS/2 will be the best platform for running Java applications and continue to leverage the quality, reliability, performance and ease of use of OS/2.

Microsoft will certainly not sit by and watch its monopoly unravel though. It is working on a number of strategies including platform-specific components such as ActiveX, component alternatives such as the Microsoft Foundation Classes (to counter the JFC), and compilers that compile Java to native machine code for Windows platforms. Microsoft wants Java to succeed as a language but fail as an operating environment, thus enabling it to maintain control of the desktop and dominate the server market.

I believe that Java will succeed as a programming language. It is significantly better than C++. As a multiplatform environment, however, it will only succeed if IBM and others can continue to deliver viable alternatives to Windows such as OS/2. Java can expand the OS/2 marketplace as Java applications become a reality, but only if IBM delivers on its OS/2 promise. Java, alone, will not revitalize or save OS/2. IBM must do that. Software consumers, who will benefit the most from Java, must insist that IBM do so.

Related reading:

"Conference Report: The Java Revolution, Year Two," by Philip J. Gill, Java Report Magazine, May 1997.

"Special Report: Java, Growing Up Fast in the Web Hot House," by Michael Moeller, ZD Internet Magazine, August 1997.

"The JDK 1.1's New Delegation Event Model," by Jeremy Sevareid, Java Report Magazine, April 1997.

Dan Porter is the President of InnoVal Systems Solutions, an OS/2 and Java development company.

[Index]  [ Previous] - [Feedback] - [Next ]

[Our Sponsor: BMT Micro - Registration site for the best OS/2 shareware applications available.]

This page is maintained by Falcon Networking. We welcome your suggestions.

Copyright © 1997 - Falcon Networking