Introduction to the Java Platform

The Java platform consists of the Java language, Java bytecodes, and the Java Virtual Machine (generally termed the JVM). The analogy behind the Java platform is that when you compile your Java code, it is translated into Java bytecodes, which can then be interpreted by the Java Virtual Machine. In practical terms you may enter your source code into a ".java" file (the Java language), which will then be compiled into a ".class" file (the Java bytecodes). The class file can then be run on the Java Virtual Machine, which runs on your computer. This means that your single compilation will run on many platforms, at least in theory, as each has its own version of the JVM interpreting the bytecodes on the particular platform. There are many implementations of the JVM on various operating systems, such as Windows, Mac OS, Solaris, Linux, etc.

In addition to having platform independence, Java can seriously reduce coding time because it is a very well-structured language. If you do not understand object-oriented programming, do not worry about this for now, as we will explain OOP in the following chapters.

Note 

All the individual parts of Java, such as the Java language, the Java Virtual Machine, and the Java bytecodes, are collectively known as the Java platform.

Another key element to Java is the ability to create small programs known as applets that run within a web browser, which run independently by means of the Java Virtual Machine (yes, web games that run inside a browser). What's more, it is easy to include an applet in a web page using the <APPLET> tag (we will learn about this in Chapter 8, "Applications and Applets"). There is also little difference between creating games as traditional stand-alone applications or as applets, as we will see later in the book.



Java 1.4 Game Programming
Java 1.4 Game Programming (Wordware Game and Graphics Library)
ISBN: 1556229631
EAN: 2147483647
Year: 2003
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net