INSIDE ...

The Whole Story
Life with Your First NC
PC vs. NC: Their Defenders Face Off
First Suite Could Be Sweeter
Match the Tool to the Job
NC Hardware

Java Adds Steam to NC Engine

PC or NetPC: What's the Difference
TV Tunes In to the Web


EXCLUSIVE WEB COVERAGE
Analysis: Java Anywhere? Not Yet.
WinMag NC page

WINDOWS Magazine
April 1997, Cover Story


April 1997 Table of Contents


PC vs. NC:
Java Adds Steam to NC Engine

-- by Martin Heller

Java is a Pacific island, a slang term for coffee, and-in our Web-centric world-a programming language. You've read plenty of hype about Java, and you know you need a browser that supports the language to be able to run Java programs or applets. But Java is also poised to play a significant role in the development of NCs.

Java Journal

Sun Microsystems created Java. First called Oak, it was intended to be a language for embedded systems-that is, for small consumer devices, rather than traditional computers. Because new computer chips for consumer devices are being developed all the time, Oak was designed to be "platform-neutral"; and because those devices must be highly reliable, Oak was also designed to remove the possibility of incurring the most common errors found in C and C++ programs.

Sun's consumer device projects never found their way into commercial products, and the name "Oak" was already taken by another language. The new-and now familiar-name, Java, was inspired by a local coffee shop. The Java team soon realized that a platform-neutral language might be useful for the emerging World Wide Web. They developed a Web browser, HotJava, completely in the Java language, but the real Java jolt came when Netscape licensed Java and included support for Java applets in Navigator 2.0.

But Navigator 2.0 also shipped with its own scripting language, LiveScript. Netscape changed the name to JavaScript as part of its deal with Sun, but the two languages have no real technical relationship. JavaScript is an interpreted scripting language with an object model that reflects the structure of Web documents and browsers, and bears some resemblance to BASIC, C and Pascal. Java is a compiled language based primarily on C++, with standard class libraries that owe a debt to Smalltalk.

Java Appeal

Java programs can be applets or applications. Java applets are designed to run in the window of a browser; Java applications run in a separate window. To keep them from damaging or stealing your computer files, applets normally have restricted functionality. This is sometimes referred to as keeping them in their own sandbox. Applications have no such restrictions. "Trusted," digitally signed applets are allowed out of the sandbox, using essentially the same security mechanism as ActiveX controls.

Java's neat trick is that it can be compiled but still remain platform-neutral. The Java compiler turns source code into byte code operations for a "virtual" Java machine, much like the old UCSD Pascal turned source code into "p-code." The Java machine is considered "virtual" because it exists as a software simulation, which runs on some other processor. Java virtual machines (VMs) now exist for all Windows platforms, Macintosh platforms and, of course, Sun's Solaris. In addition, several announced chipsets implement the Java instruction set as native hardware or firmware instructions.

So the parts begin to fall into place: Take a Java chip and some RAM, add the Sun Java classes and HotJava in ROM, throw in enough of an operating system to boot HotJava and run the keyboard, screen, mouse and Ethernet hardware, and you've got the makings of a small, self-contained Network Computer.

Back to Top

PC or NetPC: What's the Difference