next up previous contents
Next: Java Applets vs. Java Up: Java Previous: Java

Introduction to Java

The Java language is an object-oriented programming language developed by Sun Microsystems. Modeled after C++, Java was designed to be simple, small and portable across platforms and operating systems, not only at the (compiled) binary level but also at the source level. Note that Java language has nothing to do with ``JavaScript'', a script language developed by Netscape that can be included in HTML pages and which can be executed by web browsers.

The Java language has been formally specified in the ``Java Language Specification'' [13] in 1996. Only recently the new version 1.1 of the Java Development Toolkit (JDK) has been released with which some minor changes have been made tho the language specification. This new version is documented in [19].


  
Figure 4.5: Java Execution Environment
\begin{figure}
 \begin{center}
\vspace{1cm}
 
\epsfig {file=xfigpics/javavmlyr.xfig.eps}
 \end{center}\end{figure}

Java sourcecode is translated into Java bytecode using the Java compiler javac. As mentioned, the format of the bytecode is the same on all implementations of the ``Java Virtual Machine'' (VM). This format, as well as the command set of the virtual machine, is specified in [25]. The VM interprets the byte code and executes it. In the future, Sun is planning to provide a special hardware chip that can directly execute the Java bytecode, but today even the special ``Java Stations'' Sun is vending are still based on bytecode interpreters.

Figure 4.5 shows the Execution Environment. The Java VM has already been ported to a large number of platforms. It is nowadays included in the Netscape web browser as well as the Microsoft Internet Explorer and therefore available on almost every desktop PC. Ports exist as well for all major UNIX platforms.


  
Figure 4.6: The Java Development Environment
\begin{figure}
 \begin{center}
\vspace{1cm}
 
\epsfig {file=xfigpics/javaarch.xfig.eps}
 \end{center}\end{figure}

The Java language itself is very compact and can therefore be learned easily. The important part of the JDK however is the included set of class libraries. Those libraries provide a common subset of methods and objects that can be used to write portable programs in Java. In particular, they include the ``Abstract Windowing Toolkit'' (AWT) that provides a common set of objects and methods for writing user interfaces. Those methods use the window manager / graphical frontend of the platform the code is running on.

Also included in the JDK are some additional tools like the jdb Java debugger, a bytecode disassembler and the ``appletviewer''. Sun also provides the ``HotJava'' web browser, which is completely written in Java. This browser can be used to display Java-enhanced web pages.

To summarize, the important elements of the Java environment are:



 
next up previous contents
Next: Java Applets vs. Java Up: Java Previous: Java
root
8/4/1997