time for java ?


Hello, click me, I'm Duke

The JAVA story

So what is it ?

JIT

Applets

Links



Java was introduced into the mainstream by Sun Microsystems in 1995 and instantly created a new sense of the interactive possibilities of the web. Since then, nearly all the major Operating Systems vendors have added a JVM, closely integrated into their products.

JAVA arrived at exactly the right place at the right time. Since its introduction, a constellation of forces - other Internet innovations, software economics, industry politics and customer need - aligned almost simultaneously to let JAVA emerge.

Companies spend large amounts of money on IT systems and software, and then link the machines into networks. Even as PCs get cheaper and more powerful, they grow evermore expensive and difficult to maintain, costs which are becoming harder and harder to justify, much less afford.

At the same time, the industry's two near monopolies - Microsoft with its Windows Operating System and Intel with its microprocessors are leaching more and more of the profit from the PC business. Companies like IBM, Apple Lotus and Borland would like nothing better than to take Microsoft down a peg. Customers too are increasingly uneasy as the 'cosy' Wintel (Windows / Intel) hegemony threatens competition and product choice. Some quarters are routing for a product like JAVA to keep Microsoft from being able to dictate corporate computing technologies and strategies.

Apple, which many customers have deserted because of the Macs incompatibility with Wintel PCs, has a chance with JAVA to be relevant again. Likewise JAVA gives software companies a way to win back some of the business they lost to Microsoft as it methodically parlayed its ownership of Windows into dominant positions in applications software. Lotus, now part of IBM, was one of the biggest losers, falling from first place in spreadsheets in the early Nineties as PC users switched from DOS to Windows, a transition Lotus was late to spot. Lotus foresees a similar shift now to JAVA computing, in large part because Windows and the Microsoft Office word-processing and spreadsheet programs have become so massive and feature laden ('fatware') that they bog down all but the most powerful PCs.

JAVA computing will also let corporate users fundamentally change the way they do business. That's because with JAVA it is easy to develop safe programs that allow customers and suppliers to tap into each other's private computer networks - say to place orders or check design specifications. From the Corporations point of view, JAVA will simplify the creation and deployment of applications thus saving money. Apps created in JAVA can be deployed without modification to any computing platform, thus saving costs, and because the applications are stored on centralised servers, there is no longer a need for people to insert disks or ship CDs to update software.

To coordinate their efforts SUN launched a subsidiary called JavaSoft, the keys to JAVA success as a platform are ubiquity and absolute compatibility throughout the industry. To achieve the first, SUN hitched a ride on Netscape's Navigator Internet browser, the program that unleashed the whole Internet phenomenon in the first place. Although the early version of JAVA in Navigator (2.0) was slow and bulky, it still created a buzz in software circles because it showed that JAVA applets could indeed travel over the Net and be used by any type of computer.

For JAVA to arrive as an industrial strength software development platform, Sun had to vastly improve the performance so it can load and run applets faster. The best way to accomplish this goal was to get makers of Operating Systems to integrate JAVA into their software. It's a sensitive matter because software companies are finicky about their Operating System code and don't like to let outsiders muck about with it. Customer demand was such though that every major operating system company, including Microsoft, rolled out a version of their operating system with what Sun calls a "JAVA Virtual Machine" which describes an abstract environment where instructions not suited to an Intel processor can be processed.

Microsoft can thank Netscape for putting them in the extraordinary position of having to support a technology that could badly undermine Windows. Once Microsoft decided they wanted to unseat Netscape as the browser king they had to incorporate JAVA into their own browser. Internet users would not stand for anything less. Microsoft eventually became a JAVA licensee after months of haggling over price and other details. Like other languages, Java is royalty free to developers for writing applications, however the JVM is licensed to the companies that incorporate it in their browsers and servers.

Sun has launched work on a flock of interesting JAVA devices and hardware. Sun has developed a miniature Operating System of its own, ideal for running applets, called JAVA OS. It powers Sun's JavaStation network computers; Sun have even produced dedicated microprocessors for the machines. The chips and software are cheap enought to go into printers, set top boxes and even cellular phones.

JAVA is also making possible a controversial new class of cheap machines called Network Computers, or NCs, which SUN, IBM, Oracle, Apple and others hope will proliferate in corporations and our homes. Originally known as a way to jazz up web pages with graphic animations, JAVA has quickly evolved into a whole lot more. To Microsoft's dismay it is fast becoming what is known as a computing platform, a sturdy base on which programmers can build applications.

top



Sorry, your browser doesn't support Java.

Most of us do not know about the detail and syntax of programming languages, professional programmers gain awareness by constant use. However, looking at languages in a broader context such as where and how they are used can give the non professional a perspective of computer languages without a working understanding of their use.

Mainframe computers weren't of much use in the workaday world until Cobol (Common Business Orientated Language) came along and made it easy to write the first accounting and inventory programs. IBM's Fortran (Formula Translation) language made it possible to program engineering workstations and super-computers for scientific analysis.

It was Basic - a version of which was Microsoft's very first product - that let hobbyists program early computers. Another language known as C++ streamlined development of point n' click graphical programs like the ones used with the Windows Operating System, and demonstrates the Object Orientated approach.

The JAVA programming language was modelled after C++, it has the same 'look and feel' to the professional programmer, however it is simpler to use than C++ and enforces a completely Object Orientated view of programming. JAVA is expressly designed for use in the distributed environment of the Internet and was developed by the JavaSoft division of SUN Microsystems

Why suitable for the Internet? What are the differences from other high level languages? To give an answer to these questions it is necessary to understand the process of producing a working program or object code from the efforts of the programmer who has used the JAVA language to write a program, or the source code.

Firstly, the source code is compiled into stuff called 'byte code', which produces a file with a '.class' file extension. This stage is peculiar to JAVA. The 'byte code' must then be converted into machine code (ones and zeros) at run-time, the working program. On finding a JAVA applet, your Web browser switches to its JAVA interpreter (if it is equipped with one and if it is enabled). The Interpreter is also referred to as the JAVA Virtual Machine (JVM). A virtual machine can be thought of as an abstract rather than a real 'machine'

The JVM (existing on any platform) processes (via the Interpreter) each of the byte codes in the '.class' file into instructions understandable by the particular processor, and then executes them. However, the JVM handles one byte code instruction at a time, such is the way of an Interpreter.

The JVM can 'seamlessly' pass the byte code to a 'Just in Time' (JIT) compiler, introducing another stage to produce object code, but which will in most instances improve performance. The JIT (at a particular system platform) compiles the byte code into instructions that can be sent directly to the processor. Once code has been re-compiled in this way, it will usually run more quickly than just plain Interpreting the byte code. Note: Java is generally thought of as an interpreted language but JAVA programs can be compiled directly into machine code for a target platform for fastest performance where hardware independence is not a consideration, i.e use on a single computer.

Java programs are therefore not dependent on any specific hardware and will run in any computer platform with the JVM. In the past, most programs written in any language have to be re-compiled, and sometimes, rewritten for each target platform. One of the biggest advantages of Java is that you only have to write and compile a program once. This makes JAVA ideal for Internet use, as the Internet is a connection of all different types of hardware. Also parts of the program can exist in different places. JAVA is also inherently virus proof, the language was designed so applets can't alter data in your computer.

top



JavaScript from Netscape is easier to use but not as powerful and works through the features of an HTML page, whereas JAVA can have a tailored, individual look.

Applets can be downloaded from the Internet and positioned in a web page. Certain key parameters that underlie the Applet can be changed. In the clock above, the diameter, clock face, back colour, hour, minute and second hand colours can all be customised. These parameters can be given in the HTML text of a web page and are accepted by the '.class' file. The class can therefore be thought of as a template, waiting to be fed with real values. When the class is running on a computer, it can be thought of as a 'class instance' or 'Object'. The definition of a class is reusable not only by the program for which it was initially created but also by other object orientated programs, or applets. Indeed using a class in this way is best practise. These are the basic principles of OOP

After downloading a free applet from the Internet is important to remember that the '.class' files are correctly referenced in order for the applet to function, i.e they are positioned correctly in your file structure. On the Internet, running applets are different from ordinary applications programs running directly on a PC as they reside on the network in a server. ( as does all the code of a web page.) The network delivers the applet to your system when you request it ( i.e a reference to it from a web page ). Java is a 'dynamic' language and you are not allowed to 'statically' compile all the .class files into machine code until they are actually 'called'. Thus the JIT is really "just in time", since it compiles methods on a method by method basis just before they are called. The applets on this page are all basic applets to brighten web pages, however JAVA implies a lot more and applets can act as a 'front end' to collect and return information to a server, thus saving much of the o/head of conventional programs. Applets can provide the user with interaction on a web page in this way.





~ Selected Links ~
developer.com - How to...
developer.com - Sites
Java Hot-Links
Real Time example (local)
JAVA Quiz (local)
Yahoo
~ Selected 'java.sun.com' ~
What is the Java platform ?
The Java Phenomenon
The Java Tutorial
applets
JavaBeans: The Only Component Architecture for Java TM
What Is an Object?
Object-Oriented Programming Concepts

Sorry, your browser doesn't support Java.
back forward top
 
Site Map