The JVM sits between the code and the operating system, working as an interpreter, as illustrated in Figure 3.1.Figure 3.1 A single Java program can run on any operating system, as long as a Java Virtual Machine is available.So, as long as there is a Java Virtual Machine for your operating system, be it Windows 98, UNIX, or even something you've written yourself, the same Java code will run on it.

This, as you might imagine, doesn't really fit well with the nature of the Web, where the same content can be accessed on virtually any type of system.

So, it was only a matter of time before someone proposed a universal language of sorts. Sun already had a decent foothold in the Internet space when it announced that it was working on Java, a programming language that would run in a variety environments, because at that time virtually all Internet servers ran on an operating system called UNIX, and a large percentage of those used Sun's flavor of UNIX, Solaris.

Of course, there weren't too many desktop machines using UNIX at the time, so the discrepancy between software that would run on the server and software that could run on the browser, or client, was huge. The key to Java is the idea of the Java Virtual Machine, or JVM.

You might have noticed that until now we haven't said much about what operating system you're using. XML is just text and can be created on any operating system where you can create a text file.

Actually programming, however, is generally much more restrictive than that.

After all, you can't just take a program written for, say, the Apple Macintosh and run it on Windows 98, right?Well, of course, that used to be correct, and for good reason.The vast majority of XML tools and applications are produced in Java.In this sample chapter, author Nicholas Chase introduces Java by walking you through each concept as it arises.Learn how to install Java so you can use a parser to check your documents, as well as how to create a Document Type Definition for your data, analyze it, tweak it, and convert it to a basic XML Schema.Leave here prepared to do some basic Java programming.