Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesThe Bitter Taste of Java


January 1997 / Cover Story / Today the Web, Tomorrow the World / The Bitter Taste of Java

In the Java world, your code might be bug-free but still not work properly. This is especially true when you test it with a different run-time environment -- even another run-time environment on the same computer.

That's because Sun and JavaSoft haven't ironed out all the wrinkles in Java, particularly in the Abstract Windowing Toolkit (AWT) classes that let Java programs use native GUI features. Also, the vendors who license a run-time environment from Sun are primarily responsible for adapting it to their products a nd to native platforms, and some vendors do a better job of this than others. JavaSoft says testing improvements will mean fewer variations in the fut ure.

In the meantime, Java pioneers need patience. To get a taste of what early developers face, I wrote a Java version of a program I've already written in three other languages. My project was a data-entry applet for friends who enter my annual Academy Awards contest. Because the applet also provides data verification and back-end processing, it needs more than Hypertext Markup Language (HTML). I've written a Windows version with Borland Delphi (Pascal) and two Mac versions with HyperCard and FutureBASIC.

I developed my Java applet on both a Mac and a Windows PC. All the Java tools I tried -- including versions of Symantec Café, Microsoft Visual J++, and Metrowerks CodeWarrior -- caused problems. They frequently crashed, and their applet viewers either ran my program poorly or wouldn't run it at all. In fact, I had the least trouble when I abandoned those tools, wrote my code with ordinary text editors, compiled it with Sun's free command-line compiler, and tested it with Web browsers.

The accompanying screens show how various run-time environments interpret the same code in different ways. My class files were completely portable -- Java lives up to that promise -- but the results weren't always what I expected. Some run-time environments completely ignored methods and events in my code, while the identical code ran fine elsewhere.

If you're not comfortable with these kinds of problems, wait for better tools and run-time environments. From what I've seen, things will be a lot more stable in a few months.


One App Three Ways

screen_link (75 Kbytes)


Up to the Cover Story section contentsGo to previous article: The Bitter Taste of JavaGo to next article: JavaBeans: Cross-Platform ComponentsSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network