personal website


header image

Java Jive Time

Java Jive Time

Is Java the best thing since ‘sliced bread’? (And what was ‘sliced bread’ the best thing since?) Perhaps my Catholic upbringing can be blamed for my desire to reduce the great questions of life to ternary rather than binary solutions. I shun the simplistic dualities; the fundamentalism of good and evil, the Gestalt of figure and ground, the rigid determinism of cause and effect, the Gothic psycho-drama of eros and thanatos, the exotic allure of yin and yang, let alone yoni and lingam. For me, the holy trinity of computing consists of the operating system, programs and data.

Operating systems

A computer is like sand without its operating system. It is reduced to a worthless collection of silicon crystals. The operating system connects the ‘Central Processing Unit’ of the computer to the outside world via keyboards, mice, screens, modems etc. The operating system communicates with the CPU in a special ‘low level’ language known as ‘machine code’. There is a different version of machine code for every type of CPU. So there is also a different operating system for every type of CPU. The operating system is also tied to the hardware that makes up a particular computer. It must ‘know’ the layout of the keyboard, the size of the screen, the way floppy disks are formatted etc. As a result operating systems cannot be moved from one type of computer to another. For example ‘DOS’, ‘Windows 95’ and ‘OS2’ will only run on IBM compatible computers. ‘Unix’ will run on a Sun work-station. ‘System 7.5’ will only run on a Macintosh computer.

Programs & Data

This fundamental division extends to programs like word processors and spreadsheets. They are also compiled into machine code that is optimised for each processor, its operating system and the idiosyncrasies of the associated hardware. As a result programs cannot be simply copied from one operating system to another. As a trivial example, the ‘alt’ key on a PC is not found on a Macintosh. A program that requires this key cannot be transferred. Separate versions of the same program can be written for different platforms but this is a time consuming and expensive process.

All useful programs produce data. Unfortunately each operating system has its on method of storing data. My NEC laptop cannot read a document saved by an equivalent word processor onto a Macintosh disk. The result is an electronic ‘Tower of Babel’.

Sending text

The original attraction of the Internet was the ability to connect any computer to any other computer regardless of operating system or platform. This was accomplished by the specification of a set of rules for the exchange of data known as TCP/IP. (Transmission Control Protocol / Internet Protocol) Another protocol, the Simple Mail Transfer Protocol (SMTP), allowed the transfer of text documents, also known as electronic mail (Email). The text was independent of operating systems because no special formatting was allowed. The designers of the Internet were taken by surprise at the speed with which Email grew.

Sending pictures

The next type of data that people wanted to exchange was pictures. First of all they had to create a format for pictures that did not rely on any particular operating system; the Graphic Interchange Format (GIF). Specific GIF display programs were written for each operating system that took into account the peculiarities of their specific displays. It was not easy to pass GIF images via Email. They had to be encoded into letters of the alphabet at one end and decoded again at the other end . This was known as uuencoding and uudecoding. (UU originally stood for Unix to Unix.)

Sending programs

Programs could be transferred using uuencoding but it was pointless transferring programs from one operating system to another for the reasons described above. What was needed was a format for programs that did not rely on any particular operating system. Enter Java.

Java programs are stored as ‘byte code’ . This code is read by a special program called an interpreter . The interpreter translates the byte code into the machine code that will be ‘understood’ by the CPU. This slows the program down by a power of 10 but the result is the holy grail of platform independent programs. An interpreter has been written for every major type of CPU.

“But what about the other differences in computer hardware?” you ask. Every Java program is made up of a series of individual blocks of code known as ‘classes’. If a Java program wants to write to a computer disk it calls on an object from the ‘disk writing’ class. Each operating system has libraries of these classes available to take care of differences in computer architecture.


Now I can write a program to display the oxygen-haemoglobin dissociation curve on an NEC computer. On my machine an interpreter designed for IBM compatibles will translate the byte code of my program into machine code for my 486 CPU. When the program wants to draw the curve on the screen it will call upon objects form classes that can draw on the screen of an IBM compatible machine. I can send the byte code to a friend with a Macintosh computer. Her machine will have its own interpreter to translate the byte code into machine code for a Macintosh CPU. When it needs to draw on the screen it will call upon classes that she has stored on her machine, designed for her display.

Java and the Internet

The Internet has made a series of quantum leaps. The first surge in interest came with Electronic Mail. The second with News groups that linked people with special interests. The third leap came with the arrival of the World Wide Web. This made it possible for inexperience users to gather text and pictures with the click of a mouse. The next wave will be made possible by the transfer of programs over the net.

If you want a word processor you will simply down-load it from the net, irrespective of the type of computer you have. Why pay $500 for a word processor that you may only use twice a week? It may be cheaper to ‘rent’ one when you need it. For that matter why buy a large hard drive to store data when you can rent memory from an Internet service provider. Many computers will simply become terminals to the ‘mother of all mainframes’; the Internet. I could be writing this article on a word processor in Switzerland and storing the document in a memory storehouse in Taiwan.

Post Script

There is a good review of Internet service providers in this months Choice magazine.(June 1996)

Dave Sainsbury

EMAIL: david.sainsbury”AT”adelaide.edu.au  Last Update:02/05/2005


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.