by Daniel H. Steinberg

Java to be — or not to be — on the BeOS

news
Jul 1, 199811 mins

Be Inc. has produced a fast, clean, and robust modern operating system with features that should interest Java developers -- the question is, where <em>is</em> the support for Java?

At the Be Developers’ Conference (BeDC) last March, Be Inc. distributed its Be Operating System (BeOS) Release 3. This release marked several firsts for the young company. For one, this was the first release that was not preceded by either a “Developers Release” or “Preview Release” label. And this was the first release targeting Intel machines. Although previous releases have worked on Power Macintoshes, the Power Mac version of Release 3 wasn’t quite ready in time for the March BeDC.

Last August, at MacWorld Expo in Boston, Be’s chairman and CEO Jean-Louis Gassée was busy showing off Preview Release 2 of the BeOS. I asked if he could briefly explain why Java developers should be interested in the BeOS. Gassée smiled and said “M-P-M-T — multiprocessor, multithreading.”

The multiprocessor aspect of the BeOS provides a demonstrable increase in speed. Plus, users don’t have to wait until applications are written that take advantage of the additional processors — that job is left to the BeOS. As Be engineer William Adams explained to developers, “You don’t really care how many CPUs are in the machine, and you don’t have to; you furthermore don’t have to do anything special to deal with extra CPUs. Your job is essentially to reinvent your application in a very multithreaded way. Our job is to make it run efficiently.”

The BeOS Intel release can be installed on single or multiple-processor Pentium II machines. The Pulse application gives a graphical display of processor activity, so on a multiple-processor machine you can watch how the OS balances the processors. The Pulse application also allows you to turn the various processors on and off. You can observe the difference in speed as you disable the processors one at a time. Actually, the controls used to allow you to turn off all of the processors. Not surprisingly, users who selected this option noticed a dramatic drop in performance. (It’s like allowing a pilot to turn off all the engines in an aircraft.) Be engineers were surprised by the number of users who went so far as to turn off the last processor. Needless to say, that option has been removed.

The promise of pervasive multithreading is appealing to Java programmers. “If you’ve done any BeOS programming,” Adams wrote in a recent Be newsletter “you’ve probably been using threads whether you intended to or not.”

At the March BeDC, Steve Sakoman, Be’s vice president of engineering, demonstrated an application that created and destroyed sixty threads per second. Sakoman warned that he was not recommending this as a good programming technique, but that the video effects demo showed an application that “spawns two threads for each frame — one to render effects for even scan lines, the other for odd scan lines. The two threads run to completion and die. The app waits for the next frame to arrive and repeats the process. Thus, 30 times 2 threads are created (and destroyed) each second.” The multithreading news may interest Java developers, but the question is Where is Java?

Preview Release 2 includes Java tools

The August ’97 Be Developers Conference in Boston included an outline of Java on the BeOS; Be had plans to integrate the language into the OS. Be’s chief technical officer (CTO) at the time, Erich Ringewald, announced that the spring 1998 Intel release of the operating system would include the integrated Java VM and AWT 1.1.

On the floor of last August’s Macworld Expo, Jean-Louis actually said more than just “M-P-M-T.” He went further, saying that “Be and Java is an interesting combination of language and playback.” To see the potential impact of Java, Jean-Louis looked back at how important BASIC was for PCs. BASIC was a multiplatform solution, but, Gassée points out that “Java is a modern, richer language with tighter control and universal appeal. Java is a fairly clean standard.”

It was also announced at the August BeDC that Metrowerks would continue to provide the development tools for the BeOS. Metrowerk’s Brian Stern did a demo of Java working on the BeOS. One of the advantages, he explained, is that “Java threads are BeOS threads.” Although his demo used JDK 1.02, Stern promised, and Metrowerks delivered, Java 1.1.4 in early fall ’97.

Metrowerks President and CTO Greg Galanos explained that “given the modern architecture of the BeOS, implementation of the Java VM maps more efficiently — mapping directly to Be’s native threads. C++ will give you the best efficiency if you are only writing for Be.” Galanos continued, “If you use Java as just a language and then compile into a native executable, you will get comparable results to C++.”

In an interview at last August’s MacWorld Expo, Be’s CTO Erich Ringewald said it best: “If Java had existed six years ago, we would have used it and not C++. We’ve seen a lot of the limitations of C++. I wish Java had been available at the time.” On the other hand, Ringewald cautioned that “support right now for writing BeOS in Java is not there yet.”

On the positive side, Ringewald added that a “Java programmer’s object is platform independence, and Be is the only operating system that runs on both the Power PC and Intel boxes.” Ringewald saw a future for Be applications written in Java that target digital media, streaming media, and embedded systems running on more than one processor.

Release 3: Intel in and a refocusing of resources

The big story at the March ’98 BeDC was the Intel release of the BeOS. Actually, developers had been treated to a preview of this at the August ’97 BeDC, where the demo of the power of the BeOS was performed on an Intel box.

Gassée has recharacterized the BeOS as a “specialized media OS in Intel space.” He noted, “Conventional wisdom says you can’t build an OS anymore,” and he cited the experience of OS/2 and IBM. Be’s goal, he explained, was not to compete with Windows but to use the Linux model and have as a goal a “specialized product with more expressive power in the API and less software silt.”

Alex Osadzinski, Be’s vice president of marketing and sales, announced that for the first time, the BeOS would be sold to the public. The range of supported hardware is still limited, but Be expects the initial target market to be “geeks and enthusiasts.”

Osadzinski also announced that Metrowerks and Be had made a few changes to their initial agreement: they’ve extended it to include the Intel port and split up the product differently. Be now manages the IDE while Metrowerks supplies the compilers, linkers, and libraries. As a result of the new arrangement, Java is no longer explicitly supported on the BeOS. The loss of Java to the platform was overshadowed by the news of the Intel port.

“This is a great time for the BeOS to come to Intel architecture; the performance is there. By Christmas the whole line will have Pentium II’s from top to bottom,” said Claude Leglise, vice president of Intel’s content group and director of developer relations. He explained that Intel sent engineers to Be to help with the port because it “helps us brag. It makes the platform look wonderful.”

“The BeOS complements Windows real well,” Leglise continued. “Specifically, the BeOS brings us a new market. The digital content creation community has not historically used Intel.”

What about BeOS on the Mac?

Release 3 of the BeOS was available to be shipped publicly by the end of March 1998, with the Power PC version planned for release a month later. But with the Intel port shipping, would the Power PC version be abandoned?

In early 1997 some Mac magazines were speculating that the BeOS would be the next Mac OS. Apple had slipped on its schedule for OS 8 (meaning “Tempo,” not to be confused with the OS 8 it released later). Be was available on Mac clones from Power Computing, Motorola, Umax, and others. The trade magazines argued that it would be easier for Apple to adapt and tune the work that had already been done at Be than to continue to build a new MacOS from scratch.

And then Steve Jobs rejoined Apple.

The OS that Apple chose to adapt was the one that Jobs brought with him from NeXT. This would become Rhapsody, and some of that technology will become part of Mac OS X. Jobs also eliminated the clones. By January 1998 Jobs was able to announce that Apple was posting a profit as he demonstrated the new G3-based Power Macs.

It may or may not be relevant, but Jean-Louis Gassée, Erich Ringewald, Steve Sakoman, and others from Be have all at one time worked for Apple at a fairly high level. Although Intel saw the advantage of more than one OS running on its machines, Intel isn’t producing and selling the competing OS. According to Gassée’s article in Be’s January 7 newsletter, “Apple [has] officially turned down our request for technical support to port the BeOS to the latest G3-based Power Macs. We’d be happy to add a little value to Apple’s hardware, but we’re not interested in engaging in reverse-engineering efforts, or in public controversy, over this issue.”

Whether the decision not to go with the BeOS came from Jobs or not, the effect probably will be that the BeOS will not support Mac machines much longer. Gassée says that a Power Mac version will continue to be available “as long as we have willing partners, and developers and customers for it.”

The future of Java on the BeOS: Is Java a has-bean?

Will Java, in fact, return to the BeOS? At the time of the March BeDC, Gassée was predicting that the Java VM would be part of the BeOS with September’s Release 4. Earlier that morning Hewlett-Packard had announced it would release its own version of Java, and the judge’s preliminary opinion in the Sun/Microsoft dispute over Java’s definition was just days away. To all this, Jean-Louis smiles and cautions that one should “consider Java a language and not a religion.” Rather than using Java for every application, he advises that programmers use Java “where it is best put to use” — for example, in embedded devices.

With all that the engineers at Be have to do, why did Be take over the IDE from Metrowerks? Gassée’s take on it is that the “IDE is a good product without a lot of headaches. Coordination is a lot of work. The new arrangement allows Be to steer the IDE better, and the process will be meetingless.”

Steve Sakoman says he “would like to ship a JVM with the OS” but that currently there is no plan to have a Java VM as part of Release 4.” He advises that “this would change if we find a JVM with adequate performance and reasonable business terms.”

Alex Osadzinski adds that Be’s relationship with Metrowerks gives Be “access to their Java tools if [Be] were licensed by [Sun’s Java Software Division] to use them.” As for demand for Java tools on the BeOS, Osadzinski reports that the demand has been quite low and so “we have not obtained, nor are we now pursuing, a license with JavaSoft.” He adds that providing a Java VM in the Be browser does not require a license from Sun and that Be is “watching the evolution of free JVMs, for example, Hewlett-Packard’s, with interest.” Osadzinski explains that Be is “not seeing Java happen in [its] target market of high-performance media applications.”

Conclusion

With limited resources, a small company like Be has to be careful not to spread itself too thin, but there are compelling reasons to provide support for Java on this OS. Sun’s Java evangelist Miko Matsumura says, “I would love to see those powerful threading capabilities of Be expressed with a Java programmatic layer. For a brand new OS without a lot of developers, I think it would strongly behoove Be to take Java as a primary programming environment instead of a secondary one. I do think Be is an impressive OS in an era where operating systems are not the center of attention.”

As it’s a new platform, there are not a lot of applications yet available for the BeOS. A good Java VM would make 100 percent Java applications immediately available to Be users. These would not, of course, take full advantage of the OS, but they would immediately increase the offerings. Also the BeOS has strong ties to the Internet. A good and fast Java VM available to the Web browser will quickly become necessary. As Jean-Louis says, “You have to have Java.”

Daniel Steinberg is a visiting assistant professor of mathematics at Oberlin College. He learned to program in C (by reading Kernigan and Richie and asking friends) and C++ on a Macintosh to help his research on elastic curves in hyperbolic space. Object-oriented design is the way in which mathematicians view the world, so programming in Java was an obvious next step. Daniel has taught an introductory course in Java and OOA/OOD. He thinks that the first words spoken by his daughter Maggie Rose were “My Mac” — his wife thinks Maggie was saying “Mama.”