| Java menu knowledge base What is a java virtual machine?
This small article is an absolute beginners' guide aimed at people who find themselves using applets
other people showed them, and yet who do not really know what they are about.
Surely an applet is just an applet - why do I need anything extra to see it work?
If you're used to a lot of conventional computer applications, you're also
used to the idea that if you put a programme onto your computer, it works (or
should work) without anything else. So why do you have anything extra for
applets?
Soup powder and hiking trips
The best analogy is perhaps instant soup powder and a long hiking trip.
If you're going on a long journey with a back-pack and just your feet
to carry you, do you pack canned soup or soup powder? The soup powder
is much lighter to carry, and can be reconstituted with water when
you get to a campsite.
Applets are like soup powder. They aren't really proper "computer food"
like other programmes. They are the dried-up essentials. This makes
it easier and faster to send them around the world on the internet.
When they arrive at the campsite (the computer which is going to view them),
they are "reconstituted" into full programmes. What does the reconstitution?
Something called the java virtual machine or java interpreter. The java virtual
machine is waiting at the destination all the time (like water and cooking
utilities) ready for an applet to turn up and ask to be turned into a proper
programme.
Soup powder for fun
If you look in your kitchen cupboard, you will probably come to the
conclusion that the amount of powdered food and drink in your cupboard
does not reflect the number of cross-country hikes you go on. While the
intended use of powdered and condensed food may originally have been very
specialised, today consumers find it an entertaining convenience for
general use.
The same thing has happened to java. Originally intended for specialised
long-distance lightweight transfer of computer programmes, today most
java programmes sit at home, running on the same computers from which
they originate. They still need a java virtual machine to reconstitute
them into full programmes, but this is a legacy of history.
How do I get a java virtual machine?
Usually your computer will come with a java virtual machine already installed.
If there isn't one, then when you view a site with an applet, you will get
a space which looks rather like a missing image. In the unlikely event that
you don't have one already, or in the more likely event that you need to
replace or upgrade it, these articles may help you further:
- Java virtual machine: availability
- Java virtual machine: Microsoft
- Java virtual machine: Sun
|
|