Answer»
- When your JAVA-enabled browser connects to a server and tries to VIEW a Web page that contains a Java applet, the server transmits the bytecode for that applet to your computer. Before your browser can run the applet, it must INTERPRET the bytecode data. The Java interpreter performs the task of interpreting the bytecode data.
- As you have learned, using an interpreter to read bytecode files makes it possible for the same bytecode to run on any computer (such as a Window-based or Mac-based computer) that supports Java. The big drawback is that INTERPRETERS can be 20 to 40 times slower than code that was custom or native, for a specific computer.
- As it turns out, a new type of browser-side software, called a Just-In-Time compiler (JIT), can convert (compile) the bytecode file directly into native code optimized for the computer that is browsing it. The JIT compiler will take the bytecode data sent by the server and compile it just before the applet needs to run. The compiled code will execute as fast as any application you already use on your computer. As you might expect, the major compiler and IDE manufacturers, such as Borland, Microsoft, Symantec and Metroworks, are all developing JIT compilers.
|