CNET también está disponible en español.

Ir a español

Don't show this again

100% pure Java watered down

Many developers are finding it hard to write applications entirely in Java code.

Viewers of cable news network MSNBC may recently have seen a commercial for Sun Microsystems (SUNW) in which a man tells a priest that he's been thinking "pure" thoughts. When the beatific man exits the confessional, he passes a queue of anxious programmers--one wearing a Visual Basic shirt--ready to admit their sins.

The commercial, which touts Sun's "100 percent pure Java" campaign, is not your usual television ad. But Sun has in many ways shown an almost religious determination to spread the gospel of Java to the far reaches of the globe, even sponsoring a worldwide educational tour for programmers with the support of Netscape Communications, IBM, and Novell.

The 100 percent pure Java gospel says that developers should create Java applications that are completely portable across all operating systems. The message has not fallen on deaf ears among programmers--the vast majority of whom support the idea of applications free of "native" code that anchors them to Windows 95, Macintosh, or Unix.

But despite this shared goal, many developers are finding it difficult, if not impossible, to write their applications entirely in Java code, citing a variety of reasons such as slow performance and lack of printing support.

Sun announced in late December a campaign to certify applications that qualified as 100 percent pure. While at first "pure" meant absolutely Java code and only Java code, Sun has now relaxed its requirements. According to George Paolini, director of communications for Sun's JavaSoft division, the company is now willing to certify applications that contain code native to a specific operating system as long as the developers commit to moving to pure Java by an agreed time.

In the meantime, such developers will be able to stamp a special logo on their applications to reflect its pending "pure" status, Paolini said.

"The key objective for 100 percent pure is portability," he explained. "We recognize that this is a migration path. Some of the functionality you need if you're using JDK 1.02 [an older version of the Java development kit] is going to be through platform-dependent code. We're trying to work with companies to help them to migrate over. But we recognize this is a transitional issue."

Sun's decision to give developers more leeway in its 100 percent pure program is a pragmatic one. The promise of Java is that it will liberate developers from having to port their applications to individual operating systems. But the Java platform is far less mature than those OSes, making it difficult for developers to achieve the performance or to include all the features of conventional desktop applications.

When developers can't get what they need from Java, they can simply leave out features, or as is frequently the case, they make "native calls" to features in the underlying OS. This means the application is no longer portable.

Sun has acknowledged that Java doesn't currently offer all of the tools a programmer needs and has even included a "native interface" in the new version of its Java development kit. But it added this feature relatively late to the JDK, prompting some software developers including Microsoft to create their own methods of accessing OS functions.

"I have no problem doing a tiny bit in C so I can get the functionality I need," said Arthur Van Hoff, chief technology officer of Marimba, which uses native Windows 95 code in its Castanet application for accessing modems and installing programs. "There's nothing wrong with doing platform-dependent stuff. I don't want to be religious about the 100 percent pure idea."

But some developers, most notably Microsoft, say that Sun is being dogmatic about Java purity. When Sun introduced the campaign, many press and analysts interpreted it an defensive measure directed at Microsoft, which has promoted tools that could tie Java applications to Windows.

"They all have this religious intensity about them," said Charles Fitzgerald, program manager at Microsoft. "Developers get their code up and realize, 'Hey, my code's too slow; it's not competitive with applications written in other languages.' This dose of realism sets in. That's about the time they show up on our doorstep."

Microsoft might be expected to say that, but many others agree.

"The unfortunate reality is that there's a lot of room for improvement in Java," said Stan Dolberg, an analyst at Forrester Research. "Microsoft is going to find those areas and exploit them."

A handful of companies have received 100 percent pure certification for certain programs, including Corel, Oracle, IBM, Open Horizon, and J.Stream.

But in interviews with a broad range of Java software developers, CNET's NEWS.COM found that many software vendors are using some degree of native code in their Java applications. The companies include IBM, Netscape, Microsoft, Dimension X, RandomNoise, and NetDynamics.

But even though developers may not currently have all the Java tools they need for their applications, most of them expect that JavaSoft will ultimately deliver the technology. Many heartily endorse the benefits of an application completely written in Java.

"Complete cross-platform compatibility is numero uno for us," said Scott Milener, chief executive of BulletProof. "We develop our tool once. For us to be able support eight different platforms is just insane."

Milener added that applications generated by his company's JDesigner Java development tool currently lack the ability to print, though JavaSoft has added that capability to the most recent JDK.

Some developers, though, say they aren't willing to compromise on features or performance in their applications, so they'll continue to use native OS functions.

"I have an application to ship," said Karl Jacob, chief executive of Dimension X, which was recently acquired by Microsoft. The Dimension X Liquid Motion Pro tool uses the Windows Direct3D API (application programming interface) for better multimedia performance. "I have customers," Jacob said. "They don't care about 100 percent pure Java. They care about multimedia animations or visualizing stock data. I can't give them the answer, 'Wait till next year."

Close
Drag
Autoplay: ON Autoplay: OFF