Skip to navigation

PCPro-Computing in the Real World Printed from www.pcpro.co.uk

Register to receive our regular email newsletter at http://www.pcpro.co.uk/registration.

The newsletter contains links to our latest PC news, product reviews, features and how-to guides, plus special offers and competitions.

Latest News

A lowdown on... Java

Posted on 21 Nov 2001 at 16:43

Java. Java. Java. Chances are any new release from a wide range of technologies - from mobile phones and PDAs to Web programming and enterprise servers - will make reference to this seemingly ubiquitous technology.

What is it that makes Java so important? Why is it more than just another programming language? And why, exactly, has Microsoft not fallen under its spell? Time for a lowdown...

Contents

- What is Java?

- History

- Where Microsoft fits in

- The makings of a baggy monster

- Sample code

- Java installations

- Resources

What is Java?

In a nutshell (or bean, perhaps), Java lets you build systems that are platform-independent, capable of running across networks (including the Web) and - because it's a full-featured programming language - it can bring a new level of standardised functionality to small and previously dumb devices. It is possible, for example, for very small devices to access very large databases by means of well-tested function calls. It also supports fine-grained access and security profiles to police the behaviour of distributed programs. Essentially, it has offered the promise of programming the Web to good effect.

In slightly more detail, Java is a class-based, object-oriented language created by Sun Microsystems (slogan: 'the network is the computer'). It is heavily based on C++, which is the king of the jungle as far as programming languages are concerned, with its heavy-duty support for a variety of programming techniques and its wide professional usage. The developers of Java, however, sought to simplify things and to add a number of features for the networking world (and ultimately that meant the Internet).

In technical terms, the Java creators added features such as garbage collection (the automatic tidying up of unused variables) and support for explicit multithreading. They also removed some difficult C++ features, such as operator overloading (the ability to adapt the language to user-defined objects) and support for multiple inheritance (that a user defined object could be derived from multiple 'types' of ancestor rather than a more straightforward single inheritance).

More importantly, Java was designed from the start to execute across a network, securely. As well as the elimination of the use of pointers, which languages have traditionally used to access specific addresses in memory, the language was designed to be cross-platform even at an executable level (most languages are cross-platform in source-code form, in the sense that you have to recompile programs every time they are to run on different machines). The way Java approached this was to use intermediate byte-code rather than fixed, compiled binary. Essentially, programs are decoded on the fly by Java platform-specific Java interpreters.

These JVMs (Java virtual machines) are built for various platforms and provide a consistent, known environment for Java programs to run within. Java's slogan is 'write once, run everywhere' because, in theory, once a program is written in Java it can run on any JVM supported on any machine. The 'logic' of the program will remain unchanged because it can safely make assumptions about what will be provided when it tries to execute - the particularities of the machine that hosts the program will be taken care of by the particular runtime environment for that machine.

1 2 3 4
Be the first to comment this article

You need to Login or Register to comment.

(optional)

advertisement

Most Commented News Stories
Latest Blog Posts Subscribe to our RSS Feeds
Latest Reviews Subscribe to our RSS Feeds
Latest Real World Computing

advertisement

Sponsored Links
 
SEARCH
SIGN UP

Your email:

Your password:

remember me

advertisement


Hitwise Top 10 Website 2008