What is Java?

by Charles A. Gimon


(InfoNation Logo)

You've seen the blurbs in computer magazines, and you've probably seen the instant books in the bookstore. You might have even had the subject pop up over drinks at a party, and been at a loss for words. Even experienced programmers have been asking: what is Java?

Java is a programming language that has been developed at Sun Microsystems. Several people have been on the Java team; the founding developers were Patrick Naughton, Mike Sheridan, and James Gosling, who is still at Sun. The special, new thing about Java is that it's platform-independent; a Java program should run exactly the same way on unix-based workstations, Macintoshes, or computers in the IBM/Windows/Intel extended family. (Java has the dubious distinction of having been one of the first things to be available for Windows 95, but not for Windows 3.1.)

How does Java manage this? Java programs are run by an interpreter that translates the Java instructions into something the machine you're using can understand. A Windows machine will have a Java interpreter for the Windows/Intel/IBM environment, a Mac will have a Mac-Java interpreter, and so on. More likely, you'll use a program that has Java built in. At the moment, this means Netscape for the vast majority of people--Java is built into Netscape 2.0, including the thousands of beta versions in use before the official February 1996 release. Sun has its own Hotjava web browser as well.

Java is expected to be the next big thing on the World Wide Web. Put a Java application in your Web page, and you don't have to worry about what kind of machine the person visiting your page is using.

Yet originally Java (called "Oak" back around 1990) was supposed to be a language for smart houses: it was the language your smart air conditioner was going to use to talk to your smart lamps or window blinds. The sudden popularity of the World Wide Web created a new environment that Java is well-suited for. With Java, you should have the ability to download software when you need it. After you use the software, it would be gone. When you access a web page, the server could send you data in any format--along with a Java program to display it. The most common Java "applets" today are simple animations, including the animated coffee cup logo on Sun's own Java web pages. Future uses could include pages that shop for the best airfare or do mortgage calculations online. Online gaming is another obvious Java growth area. Expect web pages of the future to move around a lot more than they do now.

There are interactive web pages today that use CGI (common gateway interface) to get information from a visitor to a web page, send it to a program on the server (usually a shell or perl script on unix systems), and then do something with the results. The Java concept is different. Web browsers that support Java will download the program into the client--the computer in somebody's house or office--and the work will happen there. This should allow the busier sites on the Web to offer more complicated and powerful stuff without overloading their server with thousands of processes.

It could also lead to a different sort of home computer--the "$500 Internet appliance" that Sun, Oracle, and other companies have been talking so much about, and even releasing pencil drawings of. If your software is downloaded when you need it...why have a hard drive at all? A dedicated web browser could have the Java interpreter hard-coded into a chip, applets could be downloaded into an ample amount of RAM, seriously important stuff could be copied onto a floppy disk. The concept has been met with a fair amount of skepticism, not least because having a fully autonomous computer at home gives the user a healthy amount of freedom. When the first Apple was put together in a California garage, the point was to take control of the computer out of the hands of big companies and universities and give it to individuals. When your applications are sitting on an Internet server way at the other end of a phone line--even a fiber-optic one--you lose some control. Some people see the "Internet appliance" as a throwback to the 60s or 70s, when guys in white labcoats ran big IBM mainframes in air-conditioned glass-walled rooms, and the average user got a dumb terminal.

Still other people see Java returning to its roots as a control system for smart appliances, from computers and PDAs like the Newton right down to your microwave oven. Java support might find its way into all sorts of mobile devices, where carrying around all your software on disk could be forgotten in favor of the immediate download.

The other concern about Java is security. Nobody in their right mind would download a program from the Internet (or a BBS, for that matter) and run it right away on their home computer...without checking for viruses, would they? Yet that's pretty much what Java does: downloads a program and runs it. Because of this fairly obvious concern, there are strict limits in Java as to what "applets" can and cannot do. The two main restrictions are:

1. Java applets cannot read or write files on the client's hard disk without specific permission (in Netscape they can't read or write files at all--period), and

2. Java applets cannot try to connect to an Internet site other than the one they were downloaded from. In other words, if your home computer gets a Java applet from site A, that applet can't be sneaky and try to connect to site B from your computer.

Some people say the security is too good, particularly in Netscape. Hotjava gives the individual user a choice whether Java applets will be allowed to read or write files; for right now Netscape has decided that too much security is better than too little, so Java applets that are downloaded into Netscape's browsers are not allowed to read or write anything on disk. The danger would be that a malicious (or badly written!) applet might fill your disk with garbage, or overwrite important files, or, heaven forbid, leave virus droppings behind. And with the recurring paranoia over Prodigy's swap files or Microsoft's registration wizard supposedly sending your most personal secrets off to the Trilateral Commission, the last thing we need is a snoopy Java applet reading what it isn't supposed to. Programmers are complaining, though, that unless Netscape eases up on its tight Java security, Java programming won't progress beyond dancing coffee cups. If you have Netscape 2.0 running (or HotJava, of course) you can see what Java is all about right now, at http://java.sun.com, where there are plenty of examples to browse, as well as FAQ-lists and documentation. To see what the rest of the Internet outside of Sun Microsystems is saying about Java, your best bet is the newsgroup comp.lang.java.

Charles A. Gimon teaches an Introduction to the PC class at the English Learning Center in south Minneapolis. He can be reached at gimonca@skypoint.com or ay778@freenet.carleton.ca.
For more about the real Java, see my Indonesia pages!
Back to my net writings.
Back to my home page.