Think of it as a universal phone adapter that you'd need for travel in Europe or Asia, where you'd encounter a variety of different jacks. No matter what the phone jack looks like, you can usually find an adapter that gets you online. The virtual machine, or specialized software code, does the same thing for computers and Java applets. The code acts as a layer between the Java program and the physical computer, and interprets instructions and logic of the Java code for a given platform, such as Windows or Macintosh. Most browsers have built-in virtual machines, and the software is also available for download as a standalone for most platforms.
Some virtual machines are better than others.
Because Java applets must run through this interpreter, and each platform vendor writes its own version, some users have complained about slow performance on weaker virtual machines - most notably the Macintosh flavor. In exchange, the program will receive marketing support from Sun. The idea is to try to prevent Java from being tied too specifically to any one platform, thus undermining the core principle behind it. Microsoft has sold more Java development tools than any other company, but the Microsoft tool allows programmers to use code that only works on the Windows platform. Microsoft does not support the 100 percent pure initiative.