The language that will light up your Web

Java turns pages into all-singing, all-dancing events. Charles Arthur on the program that gives the Net a mind

If you have been surfing around new Web sites recently, you will probably have noticed a new word: Java. About 100,000 pages contain it right now. And they may be the key to making the Web a truly interesting, useful place. Why? If you use an older browser, you may have seen this note: "If you were using a Java-enabled browser, you would see an animated ...", followed by a text description of what you're missing: dancing coffee cups, stock market prices, flags waving in an electronic breeze (at the White House site), spinning globes. You name it, someone's beavering away at animating it, or turning it into a sound file.

If you are using Netscape 2.0, you won't have to read the words - you can see the pictures or hear the sounds for yourself, always assuming you have the patience for them to be downloaded over your data link. Even quite small animations can require 50 kilobytes of data, which - given the sluggishness of many links - can mean a minute's thumb-twiddling.

But to have reached 100,000 sites is not bad for a product that was released only last summer. Its widespread success resembles that of Netscape, in that its creator, Sun Microsystems, has been distributing it for free over the Internet, letting word of mouth (or e-mail) do much of the job of publicity.

Unlike Netscape's browser, which is a program, Java is a programming language, developed in 1990 by James Gosling, a programmer at Sun Microsystems. Originally called "Oak", it was intended to be used in domestic products such as toasters, videos and car alarms. In a world where toasters, like microwave ovens, have inbuilt software (and that's not far off), you could send a Java program down the telephone line to upgrade your toaster. Gosling never lost sight of the idea that Java should be bug-proof and easy to develop but hard to tamper with. So the toaster would not catch fire because of an error in transmission or a bug.

But before that became reality, the World Wide Web happened. The trouble with the Web to date has been that while you could have titles that blinked (which were annoying to the eyes) and you could download motion or sound files to play in your own time, the actual pages themselves were dull. As George Gilder, a writer and futurist, puts it: "Content today is dead, static." But with Java, he says, "content wins".

The reason is that Web pages come to life when your browser connects to a Java-enabled site. Part of the page's contents, besides the usual HTML text, will be a small program, called an "applet", written in Java. This is sent to your computer, where it runs: dancing, singing coffee cups and so on.

You don't even have to specify what operating system (Mac, DOS, Sun) you are using: the browser picks up the code and transfers it over to your Java-enabled browser, which reads and interprets it and follows its instructions. If your browser can't handle Java, nothing happens: it simply ignores the Java instructions.

Is the applet not like a virus? How do you know it does not have an instruction such as "Wipe clean the hard disk" in it?

Mr Gosling and his associates at Sun thought of that. The applet runs inside a "virtual machine" on your computer: in essence, it ropes off an area of electronic memory (RAM) and allows the applet to create and change data only there. The applet is not allowed to access the machine's peripherals but instead passes its data back to your browser, which then passes them to the screen or disc. (Though someone did discover a way to get the applet to bypass the browser earlier this year - a flaw that was quickly fixed by Sun.)

However, the applet's resemblance to a virus means that occasionally "firewalls" - machines installed to prevent viruses and hackers getting into a private network from the Internet - won't let them past. This problem is gradually being tackled.

If you are in an excitable mood, like Danny Hillis, adjunct professor of the Massachusetts Institute of Technology, you will agree that, "Java allows the network to have a `mind'. This is revolutionary. Communication takes place between computers that is meaningful to them."

Eric Schmidt, Sun's chief technology officer, believes that Java has a key similarity to an earlier, and fantastically successful, bit of software. "Java is going to be the DOS of the 1990s," he says. "It may not be perfect but neither was DOS at first. Its chief benefit is its ubiquity. It has shortcomings, but it's everywhere."

And, who knows, in time you might be able to download cool Java programs from the Net to upgrade your toaster or microwave.

For more information about Java, including a (rather technical) introduction, visit http://www.javasoft.com/. To get a browser capable of running Java programs, try Netscape 2.0, available at http://home.netscape.com/.

A huge list of Java applets, with reviews, can be found via http://www.jars.com/

News
Howard Marks has been diagnosed with inoperable cancer, he has announced
people
Arts and Entertainment
Benedict Cumberbatch has spoken about the lack of opportunities for black British actors in the UK
film
Voices
Winston Churchill, then prime minister, outside No 10 in June 1943
voicesA C Benson called him 'a horrid little fellow', George Orwell would have shot him, but what a giant he seems now, says DJ Taylor
News
Rowan Atkinson at the wheel of his McLaren F1 GTR sports car
people
PROMOTED VIDEO
Have you tried new the Independent Digital Edition apps?
Life and Style
ebookNow available in paperback
ebooks
ebookPart of The Independent’s new eBook series The Great Composers
Latest stories from i100
Have you tried new the Independent Digital Edition apps?
Independent Dating
and  

By clicking 'Search' you
are agreeing to our
Terms of Use.

ES Rentals

    iJobs Job Widget
    iJobs General

    Austen Lloyd: Private Client Solicitor - Oxford

    Excellent Salary : Austen Lloyd: OXFORD - REGIONAL FIRM - An excellent opportu...

    Austen Lloyd: Clinical Negligence Associate / Partner - Bristol

    Super Package: Austen Lloyd: BRISTOL - SENIOR CLINICAL NEGLIGENCE - An outstan...

    Recruitment Genius: Sales Consultant - Solar Energy - OTE £50,000

    £15000 - £50000 per annum: Recruitment Genius: Fantastic opportunities are ava...

    Recruitment Genius: Compute Engineer

    Negotiable: Recruitment Genius: A Compute Engineer is required to join a globa...

    Day In a Page

    Iraq invasion 2003: The bloody warnings six wise men gave to Tony Blair as he prepared to launch poorly planned campaign

    What the six wise men told Tony Blair

    Months before the invasion of Iraq in 2003, experts sought to warn the PM about his plans. Here, four of them recall that day
    25 years of The Independent on Sunday: The stories, the writers and the changes over the last quarter of a century

    25 years of The Independent on Sunday

    The stories, the writers and the changes over the last quarter of a century
    Homeless Veterans appeal: 'Really caring is a dangerous emotion in this kind of work'

    Homeless Veterans appeal

    As head of The Soldiers' Charity, Martin Rutledge has to temper compassion with realism. He tells Chris Green how his Army career prepared him
    Wu-Tang Clan and The Sexual Objects offer fans a chance to own the only copies of their latest albums

    Smash hit go under the hammer

    It's nice to pick up a new record once in a while, but the purchasers of two latest releases can go a step further - by buying the only copy
    Geeks who rocked the world: Documentary looks back at origins of the computer-games industry

    The geeks who rocked the world

    A new documentary looks back at origins of the computer-games industry
    Belle & Sebastian interview: Stuart Murdoch reveals how the band is taking a new direction

    Belle & Sebastian is taking a new direction

    Twenty years ago, Belle & Sebastian was a fey indie band from Glasgow. It still is – except today, as prime mover Stuart Murdoch admits, it has a global cult following, from Hollywood to South Korea
    America: Land of the free, home of the political dynasty

    America: Land of the free, home of the political dynasty

    These days in the US things are pretty much stuck where they are, both in politics and society at large, says Rupert Cornwell
    A graphic history of US civil rights – in comic book form

    A graphic history of US civil rights – in comic book form

    A veteran of the Fifties campaigns is inspiring a new generation of activists
    Winston Churchill: the enigma of a British hero

    Winston Churchill: the enigma of a British hero

    A C Benson called him 'a horrid little fellow', George Orwell would have shot him, but what a giant he seems now, says DJ Taylor
    Growing mussels: Precious freshwater shellfish are thriving in a unique green project

    Growing mussels

    Precious freshwater shellfish are thriving in a unique green project
    Diana Krall: The jazz singer on being friends with Elton John, outer space and skiing in Dubai

    Diana Krall interview

    The jazz singer on being friends with Elton John, outer space and skiing in Dubai
    Pinstriped for action: A glimpse of what the very rich man will be wearing this winter

    Pinstriped for action

    A glimpse of what the very rich man will be wearing this winter
    Russell T Davies & Ben Cook: 'Our friendship flourished online. You can share some very revelatory moments at four in the morning…'

    Russell T Davies & Ben Cook: How we met

    'Our friendship flourished online. You can share some very revelatory moments at four in the morning…'
    Bill Granger recipes: Our chef serves up his favourite Japanese dishes

    Bill Granger's Japanese recipes

    Stock up on mirin, soy and miso and you have the makings of everyday Japanese cuisine
    Michael Calvin: How we need more Eric Cantonas to knock some sense into us

    Michael Calvin's Last Word

    How we need more Eric Cantonas to knock some sense into us