[Skip Navigation] [CSUSB] / [CNS] / [CSE] / [R J Botting] / [Samples] / java
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Comment/Contact] [Search ]
Thu Aug 25 21:04:36 PDT 2011


Opening Microsoft files (winzip, word, excel, powerpoint) on this page may require you to download a special viewer. Or you can download and save the files and use your preferred office applications to view and edit them.

Contents


    The Java Programming Language

       http://www.csci.csusb.edu/dick/samples/java.html

      This page is designed to be a step by step introduction to Java for a competent C++ programmer. Getting your first Java programs to run is unusually hard because
      Net

      1. Names of files have to precisely match the identifiers used inside the files.
      2. Names of classes in Applets must match the names of classes in Java.
      3. It is hard to keep all these names in synchronization as the code develops.
      4. Some books do not follow the newer scoping rules.

      (End of Net)

      Beginners can work through the [ Overview ] section below to make this process less painful.

      This page also has many links to more in depth information about Java.

      Overview

        Java is designed to be a completely object-oriented programming language used in consumer appliances like VCRs and toasters. It is based on the first version of C++ but explicitly leaves out features of C and C++ that are confusing or unreliable.

        It has inheritance and dynamic polymorphism but not generics and/or templates. It is designed with concurrent programming in mind. It has most of the expressions and control structures of C plus exceptions but without the "go to". So a C++ programer finds Java programs easy to read but verbose. It is slightly more work to write, but the result is nearly always clearer than the abbreviated C++ code.

        Java is compiled into a special machine code that is then interpreted. Java code does not perform as fast as C++. The interpreter however protects the machine on which it is running from errors that can break operating systems in C++. Furhter the same (compiled) code can run on many different systems: Compile-Once-Run-Anywhere. So a Java program can be transmitted across a network to a machine of a different type, with a different operating system, and different graphic user interface. There it will run safely and securely (in theory) and look-and-feel as if it was programmed for that system. Doing this with C++ is extremely expensive.

        Java can be used to write applications and applets. A Java application is similar to any other high-level language program: It can only be compiled and then run on the same machine. An applet is compiled on one machine, stored on a server in binary, and can be sent to a another machine over the Internet to be interpretted by a Java-aware browser.

        Java comes with a large library of ready made classes and objects. The key difference betwen Java 1.0 and 1.1 was in this library. - the AWT. Similarly, Java 2.0 has a very much larger library for handling user interfaces (Swing by name) but only small changes to the core of the language.

        Applications

          An application is compiled (using javac) and run like any other program but it is actually a Java class that contains a special method called 'main'. When the interpreter (java) is called with the name of the class, it looks for the public static main(String[]) function in the class and calls it.

          Example Application

          The following is based on the old traditional C program that prints "Hello, World" on the computer screen:
          (Hello):
             	import java.lang.*;
             	public class Hello {
             	    public static void main(String argv[]){
             	        System.out.println("Hello, World!");
             	    }
             	}

          The above is best put in a file called Hello.java [ ../cs320/java/Hello.java ] and then compiled with 'javac Hello.java' and then run: 'java Hello'.

          The import statement in a Java file allow it to refer to other classes in other files and directories. The compiler uses these other classes's definitions to check your code, and the interpreter loads the binary bytecode into the running program.

          The word public means that the thing following it can be accessed by anyone. A public class can be imported over the internet into any other class and so can be sent to a browser. A public function can be called by statements and expressions in different classes.

          static indicates that a function or object belongs to the class rather than to each individual object in the class. The function is called like this 'Hello.main(...)' even when there are no objects constructed in class Hello.

          Notice that Java code was designed to be interpreted by a machine independent virtual machine (JVM) that runs a special machine code called bytecode.

        . . . . . . . . . ( end of section Applications) <<Contents | End>>

        Tools

        The Hello application would be compiled like this:
         		 javac Hello.java
        and run by the java interpreter like this:
         		 java Hello
        Notice that the file "Hello.java" is compiled, but a class is interpreted.

        One nice feature of the Sun JDK is the documentation tool javadoc. The above application Hello has the following documentation: [ ../cs320/java/Hello.html ] which was generated by javadoc. javadoc scans source code files (*.java) and creates one HTML file per class in the files. Classes and parts of classes can have special documentary comments (starting "/**" ) added to them that are reformatted and incorporated into the Hypertext produced by javadoc. This should be a boon for realistic projects. The full syntax of the special comments can be found at [ Doc_Comment in java.syntax ] on this web site.

        The javap program disassembles bytecode (*.class files) and outputs a description of the what is in them.

        Applets

          An Applet is a small program that can be sent across the Internet and interpreted on a client machine. To give permission for remote access it must be a public class. Typically it is a class that inherits and/or defines a special set of functions needed to run an applet. These are part of the class Applet. So all Java applets are public classes that extend Applet.

          You can not run a Java applet unless it is also an application or you have a WWW page that refers to it.

          The page needs HTML like the following to call the compiled code, in the same directory:

                    <APPLET CODE="ClassName.class" HEIGHT=h WIDTH=w>
          		Alternate text
          		</APPLET>
          where h and w are the HEIGHT and WIDTH of the box in which the applet outputs its response. The alternate text appears when a browser can not handle APPLETs. For the general syntax see applet_in_html. The code in "ClassName.class" above, is the result of compiling a file called "ClassName.java" that contains a public class called ClassName which extends an Applet. (For details on HTML see [ www.html ] written in the HyperText Markup Language(HTML) [ comp.html.syntax.html] . )

          Example

          Here is a suitable piece of HTML to test a simple HelloWorld class:
           		<head><title>Test</title></head><body>
                    <APPLET CODE="HelloWorld.class" HEIGHT=150 WIDTH=150>
           		You can not see this brilliant Java Applet.
          		</APPLET>
           		</body>
          Put this in a file called:
           		test.HelloWorld.html

          The code for the HelloWorld applet has to be a public class called "HelloWorld" that extends Applet and is in in a Java file called:

           		HelloWorld.java
          Here is the Java code:
          (HelloWorld):
             	import java.applet.*;
             	import java.awt.*;
            	public class HelloWorld extends Applet {
            	      public void init() {
            	          resize(150,25);
            	      }//init
            	      public void paint(Graphics g) {
            	          g.setFont(new Font("Helvetica", Font.PLAIN, 8));
            	          g.drawString("Hello world!", 50, 25);
            	      }//paint
            	  }//HelloWorld

          The Applet is compiled just like any other program:

           		 javac HelloWorld.java
          This will generate a set of files with extension/suffix ".class". Notice that the compiler forces you to name the file "HelloWorld.java", the Class "HelloWorld", and generates the binary bytecode in a file called "HelloWorld.class". Sun has written a special program to test applets in page:
                    appletviewer test.HelloWorld.html
          However you can not use 'java' to run the HelloWorld class - it has no 'main'. Neither can 'java' "run" the WWW pages like the test.HelloWorld.html file.

          On the Suns in the Sun lab you can tell 'Netscape' to "Open local File..." and select

           		test.HelloWorld.html
          but using the older Netscape to debug an applet has some problems indicated later.

          Public Classes and Pages

          The moment a .class file or a package becomes public on the web, other Java classes, anywhere on the web, can "import" your public classes and use them to construct more classes!

          Normally you should put applet code (compiled and source) in the same directory as the public page that refers to them. This is simple and works.

          There are more complicated ways of organizing the files. It is said that if the page is in directory with path name D on the server and your operating system uses S to separate directories in path names

          	( S.DOS=`\`, S.UNIX=`/`, S.Mac=`:`)
          then the applet code for class C must be in directory DSclasses and have a name C.class. However Netscape 2.01 for Suns looks in directory D, unless you add the attribute CODEBASE=classes to the Applet tag.

          There is also an interaction between packages and subdirectories that goes beyong the basic knowledge covered here.

          Debugging Problems with Browsers


          (problems):
          • You may have to change the options/properties of your browser to be able to run Java. This is a security issue.
          • Your browser must trust the compiler you use. If it doesnot recognize the compiler version (hidden in the compiled file) it may reject the applet.

          • To be sure of a browser finding all the necessary class files they have to be in the same directory as the pages that refer to them. You can not keep the bytecode .class file private and the page public. To put .class files in a subdirectory you may have to place them in a package with the same name as well.

          • If the Applet fails, use the Options menu to open the Java Console... and look for errors.

          • The Older Netscape running in background does not make a good development tool because it is hard to make the program reload the code of Applets. You can change the code, recompile it, publish all the files perfectly, and hit the reload button in Netscape and it will not reload the new bytecode. I've wasted hours looking for bugs that I've fixed. Instead use Sun's appletviewer and/or debuggers. You can also include a main function in applets that make them applications. See [ Applications Can Run Applets ] next.

          • If it is absolutely necessary to debug the applet inside an html page then (1) use the Sun Appletviewer, (2) find a machine with Netscape 4.0 and use Shift+Reload, or (3) execute Netscape directly on a local copy of the page and Exit from it before working on the applet code. In vi you can use something like this:
             		:!java %
             		:!netscape test.page.name.html
            to suspend the editor and run Netscape on the test page. Exit Netacape and tap Return/Enter to continue editting. On Orion, if you use Q to compile a program Stuff.java and you have a readable file called test.Stuff.java then it will automagically execute netscape for you. This is in Beta -- EMail dick if you don't like it.

          Applications Can Run Applets

          The 'java' interpreter can run classes that have an appropriate 'main' function:
          	java classname
          This special method or function is called main. To run an applet it must create a window and run the applet in it. The steps are:
          1. Create a new window to display the applet.
          2. Create a new object of the correct class.
          3. Tell the applet to initialize itself.
          4. Tell the applet to start running.
          5. Add the running applet into the window.
          6. Resize the window.
          7. Show the window to you.

          Please use the following sample as a model for your own testing:
          (applet_test_harness):
           	   private final static int SIZE = 300;//size of window
          
          
               public static void main(String args[]) {
          
          
           		HelloWorld aHelloWorldObject = new HelloWorld();
           			//The aHelloWorld object exists
          
          
           		   aHelloWorldObject.init();
           			//aHelloWorld has now initialized it self
           		   aHelloWorldObject.start();
           			//aHelloWorld has now started running
          
          
           		Frame aWindow = new Frame("HelloWorld");
           			//A window called "HelloWorld" will hold the Applet
          
          
           		   aWindow.add("Center", aHelloWorldObject);
           			//aWindow now has aHelloWorld in it's center
           		   aWindow.resize(SIZE, SIZE);
           		   aWindow.show();
           			//aWindow is now shown to you (until you CTRL/C)
          
          
               }//main
          You can download an uptodate working copy of the HelloWorld class which is both an applications and and applet from [ ../cs320/java/HelloWorld.java ] Keep a copy of this and use it generate your own test programs for applets.... before you put them on the Web!

          I have just developed a new tool that will generate an HTML test page for a new applet and also a suitable *.java file ready for the details to be filled in It is in [ ../cs320/java/instantapplet ] Please download and try out -- Beta Testing.

          Another Example

          There is a more elaborate example of a Java applet/application program in [ ../cs320/java/test.Goodbye.html ] complete with links to the source code, documentation, and byte code. It also shows how to control fonts and colors of text.

          Caveat

          Here is a warning: The above main programs do not create a complete environment created by a browser looking at an HTML page. The Applet can not access the parameters that can be encoded in the page. Neither can they find out about the width and height encoded in the <Applet> tag.

        . . . . . . . . . ( end of section Applets) <<Contents | End>>

        Summary


        Table
        To getwrite this
        Application:public class C ... { ... public static void main(String[])...}
        Applet:import java.applet.*; .... public class C extends Applet ... { ... }

        (Close Table)


        Table
        A class with nameC
        is best put in a fileC.java
        and compiled byjavac C.java
        producing BytecodeC.class
        executed byjava C arguments
        and documented byjavadoc C.java
        producingC.html

        (Close Table)

      . . . . . . . . . ( end of section Overview) <<Contents | End>>

      Glossary

        Also see [ java.glossary.html ]

      1. abstract::methods=A method that must exist for objects in a class but is fully defined only in subclasses, -- an abstract method can not be private, final, native, or synchronized.
      2. abstract::classes=A class with one or more abstract methods.

      3. Applet::AWT=Class of objects that are embedded in an HTML page and initialized and run by a browser over the WWW
      4. applet::=A small program that can be sent across a network and interpreted safely on the receiving machine.

      5. application::Java=A class that defines a public static void main(String args[]) method

      6. AWT::=awt.
      7. awt::=Abstract windowing toolkit, another windowing toolkit. A set of machine independent classes that make it easier to create graphic user interfaces and output.

      8. bytecode::= [ byte_code] .
      9. byte_code::=a way of describing classes as a stream of byte oriented machine code for the Java Virtual Machine.

      10. classes::=plural of class.
      11. class::=A set of objects with similar behaviors and intelligence. A class defines a collection of knowledge and know how. Classes are defined by declaring variables and and functions.. [ class in objects.glossary ]

      12. constant::=any final field -- a piece of data about an object or class that can not be varied once it is initialized.

      13. concurrency::=faking multiple processors so that the programmer can pretend that many processes or threads are executing at one time and interacting together. [ Synchronized_statement in java.syntax ]
      14. extends::=indicates that a new class has all the properties of the class it extends. In Java all classes ultimately extend the class Object.

      15. exception::=a way of exitting gracefully from expressions and statements when something unusual occurs, [ Try_block in java.syntax ] [ Throw_statement in java.syntax ]
      16. exceptions::=plural of exception.
      17. field::java=A variable or constant associated with a class or object - a piece of data or knowledge that that object knows about and controls.

      18. file::=A collection of data. A Java source code file defines one or more classes, interfaces that is placed in a particular package.

      19. final::modifier=a final class can not be extended, a final variable can not have its value changed, and a final function can not be overridden.

      20. function::computing=A named piece of code that returns a value and may also do something
      21. function::java=A piece of know-how attached to a class or accessed via an object

      22. ISO::="International Standards Organization".

      23. implements::=indicates that a class defines all the public functions listed in an interface.

      24. interface::=The way that something is accessed from outside. The parts of an object that are shared with the clients that use that object.
      25. interface::java=A collection of abstract public function headers that can be implemented in different ways by different classes, and extended to give more interfaces..
      26. interface::=Describes a set of classes in terms of what they can do for you, but allows each class to implement these methods in any way that you wish.

      27. Java::=A language developed by Sun for developing software that is distributed over the Internet to special purpose hardware like a thermostat or (latterly) to browsers via the WWW.

      28. JDK::=Java Development Kit( compiler=> javac, interpreter=> java, classes=> AWT.

      29. JVM::=Java Virtual Machine, the virtual_machine provides the operational semantics of Java and so defines the hardware+software environment needed to run Java bytecode.

      30. methods::=plural of method.
      31. method::=A piece of "know-how". A procedure or function that is associated with an object or a class.

      32. modifier::=public | static | final | private | protected | abstract | ..., a word placed in front of a declaration that changes its semantics.

      33. object::=An instance of a class, in Java an object is always handled via a reference that is created by the 'new' operation and a constructor and can be assigned to field of that class.

      34. procedure::ComputerScience=`A named piece of code that does something for a caller'.
      35. procedure::java=a void function.

      36. public::modifier=indicates that a class, field, or function can be used by anything and anywhere on the internet.

      37. private::modifier=indicates that a class, field, or function can only be used locally inside a class.

      38. protected::modifier=A degree of hiding lie between public and private, subclasses and classes in the same package have access to these items. -- unwise since any class can claim to be a member of the same package! (Thanks to Andrew for correcting this definition)

      39. private_protected::modifier="deprecated in 1.5".

      40. package::=a collection of classes, encode as files in a common directory, that has the same name as the package and are allowed special access privileges. The default scope/access for a function or class is to its package. If no package is declared at the start of a file then the classes etc belong in the deafult global package.

      41. static::=something associated with a class rather than an object.

      42. variable::java=A piece of knowledge associated with a class or an object. Any non-final field.

      43. virtual_machine::=A hypothetical machine that can be emulated on many different actual machines.

      44. void::=word used in place of a type to indicate that a function does not return a value. -- introduced in ANSI C and still confusing people 10 years later.

      45. WWW::="World Wide Web".

      46. URL::="Universal Resource Locator'.

        Also see [ java.glossary.html ]

      . . . . . . . . . ( end of section Glossary) <<Contents | End>>

      Syntax

        Introduction

        The syntax of Java is close to C++ but a lot more verbose.
      1. syntax::= See http://www.csci.csusb.edu/dick/samples/java.syntax.html.

        In outline a java file starts with an optional package declaration and some import statements:

         	package whatever;
          import package.subpackage.....class
          import package.subpackage.*
        These are followed by a sequence of class and interface declarations:
         		modifiers name extends class possible_interfaces{
         			field and function definitions
         		}

        Field definitions have two forms:

         		modifiers type name;
        and
         		modifiers type name = initial value;
        where a type is either a classname or a simple data type like 'int' or 'char' or 'double'. If the modifiers include 'final' then the field is a constant, othewise it is a variable. The following is a very common and useful type of declaration:
         		modifiers type name = new type(arguments);

        Arrays are declared like this:

         		modifiers type name[] = new type[size];
        You can omit the initializer -- and name will be NIL!
         		modifiers type name[];
        The array must not be used until it is initialised in a staement like this:
         		 name = new type[size];

        In either case, if the 'type' is a class(like Object or Applet), the individual objects must be constructed and put in the array before they are used.

         		name[0] = new type;
         		name[1] = new type;
        perhaps.

        Function definitions have form

         		modifiers return_type name(arguments){
        			local definitions and statemants
         		}
        the return_type above is "void" or the name of a class or simple data type. modifiers are listed in the glossary. In older Java only variables (fields) can be defined as local.

        Statements have following main forms:

         		variable.function_name(arguments)...;
         		class.function_name(arguments)...;
         		variable = expression;
         		while(expression) statement
         		if(expression) statement
         		if(expression) statement else statement

        Expressions are typical arithmetic, relational, conditional, expressions of C or C++ plus

         		variable.function_name(arguments)...;
         		class.function_name(arguments)...;

        Java allows you to declare local variables and constants inside a function. You can declare a new variable or constant at any place in a function but you can not define the same identifier in different blocks. This causes a common error with for statements like this:

         		for(int i=0; i<array.size; ++i) {...}
        You must not declare i anywhere else in the same function! This constraint makes the interpreter much simpler and possibly faster since all space for local data is allocated when the function is called rather than when it is declared.

        For a detailed description of the syntax of Java see [ java.syntax.html ] at this site. The following definitions define the syntax of UNIX and HTML related to Java.

        Meta-Notation

      2. O(X)::=Optional X. #(X)::=any number of X's including none.
      3. quoted(X)::= double_quotes X double_quotes.
      4. tagged(X)::= less_than X greater_than.

      5. number::=one or more digits.

        UNIX

      6. CLASSPATH::UNIX_variable=Tells java tools where to to look for classes.

      7. UNIX_path::=directory #(":" directory).

      8. appletviewer::command=Scan HTML file for Applet tag and display its appearance.

      9. binary::=A file that can be loaded and run as a program which uses the machine's own language.

      10. java::command=run compiled class name (_). -- not the name of a class file!

      11. javac::command=compile Java source code file named (_) generating one or more *.class files.

      12. javadoc::command=Extract HTML documentation from Java Source code file named (_).

      13. javap::command=Disassemble a bytecode class (_).


        (filenames):

      14. name_of_class_file::= class_name ".class". -- watch out for case sensitivity.

      15. name_of_java_file::= class_name ".java".

      16. class_name::=identifier, appearing as name of class in class definition.

      17. name_of_HTML_page::=UNIX_file_name ".html".

        HTML

      18. applet_in_html::= applet_tag #(applet_parameter_tag) O(alternative_html_text) end_applet_tag.

      19. end_applet_tag::=tagged("/APPLET").

      20. applet_tag::= tagged( "APPLET" applet_tag_attributes ).

      21. applet_tag_attributes::=O(alignment) O(codebase) code width height O(alternative) O(name) O(vertical_spacing) O(horizontal_spacing).

      22. code::="CODE=" quoted(name_of_class_file), -- relative to [ code_URL ] & [ codebase ] below.

      23. width::="WIDTH=" number. -- in pixels

      24. height::="HEIGHT="number. -- in pixels

      25. alignment::= "ALIGN=" ( "LEFT" | "MIDDLE" | "RIGHT" ).

      26. codebase::= "CODEBASE=" quoted(code_URL).

      27. code_URL::=the URL of the directory that contains the applet's code.

      28. alternative::= "ALT=" quoted(text).

      29. name::="NAME=" applet_instance_name.

      30. vertical_spacing::="VSPACE=" pixels.

      31. horizontal_spacing::="HSPACE=" pixels.

      32. applet_parameter_tag::=tagged("PARAM" "NAME=" quoted(name) "VALUE="quoted(value)

      33. app_in_html::=tagged( "APP CLASS="name_of_class) ), --obsolete

      34. future_HTML::=tagged("embed" arguments) alternative tagged("/embed").

      . . . . . . . . . ( end of section Syntax) <<Contents | End>>

      Predefined Classes

      Java is a small language that gets much of its flavor and power from a very large and expanding library of predefined classes. Sun has provided a collection of packages in the Java run-time library

      For 1.4.2 API see [ index.html ] and for 1.5.0 [ index.html ] (Summer of 2004).

      Also see my rough introduction to some commonly used classes and interfaces [ java.classes.html ]

      In theory at least the library includes all the public classes that have been put on the WWW as well!

      Javascript is Not Java

      Javascript is a scripting language that extends HTML. In stead of having a tag that names an applet, you have a tag (<SCRIPT> that contains the script inside the page. It was invented by Netscape to allow people to write programs to generate pages dynamically. Javascript programs are placed in between <SCRIPT> ... </SCRIPT> tags in the HTML page and they are executed as the oage is loaded by the user's Browser. They can also be attached to buttons on a page.

      Javascript was once called LiveScript. It is beeing standardized by ECMA (European Standards...) as ECMAScript. Meanwhile MicroSoft has produced its own version called JScript! Even Netscape has 3 or 4 versions of Javascript. The common syntactic ancestor (C++) with Java is clear but the details are quite different to Java. The semantics is closer to Smalltalk than anything else.

      Both Java and Javascript let you produce more complex pages. Both Java and Javascript run on the user's system. A CGI [ CGI in comp.html.syntax ] is executed on the server and sends the results to the client.

      Pointers to news and Google groups: comp.lang.javascript

      Specification of Java

        Standardization

        ISO was involved in co-ordinating the development of a standard specification of Java. ISO granted Sun the privilege of proposing a "fast-track" standard. When Sun realized that they would lose control of the Java Specification as a result they backed off.

        Microsoft would prefer its own version of Java and libraries to be the standard. 10,000 developers who want Java's to be a cross-platform language have formed the Java Lobby.

        Sun sued MicroSoft for abusing its licence of Java by giving out a version that will work with only MicroSoft software rather than on all platforms. So far(Winter 1998-1999) Microsoft has been ordered to stop giving out their polluted version and have been forced to distribute an upgrade to the "Pure Java" version.

        Now MicroSoft is promoting .NET and C# as rival tecnologies to Java.

        Other Specifications

        There is a short glossary of the terms used in Java [ java.glossary.html ] in my local samples of formal documentation.

        The syntax (1.0alpha) is summarized at [ java.syntax.html ] in my documentation samples.

        Java has its semantics defined by a compiler that translates the Java source code for a virtual machine (the JVM), There is a detailed specification of the virtual machine. My own notes on Java semantics are under construction [ java.semantics.html ] in my documentation samples.


        (File Formats): A specification of the format of a .class file was held at http://www.javasoft.com/1.0alpha3/doc/vmspec/vmspec_38.html but I haven't found the replacement.....

        Java Documentation


        (Java reference): Sun's reference site [ http://java.sun.com/reference/ ]


        (Java Specification): For the the Official Java(TM) 2 Platform, Standard Edition. [ http://java.sun.com/j2se/ ]

      1. API::="Application Programmers Interfaces".
      2. APIs::= See http://java.sun.com/reference/api/index.html, and pick the version of Java that you are using.

      . . . . . . . . . ( end of section Specification of Java) <<Contents | End>>

      See Also

        Information on the Java Language

        1. (online magazine): Focus on Java Technology Guide [ http://java.about.com/ ] hosted by William Wagers
        2. (FAQ): [ javafaq.html ] [ faq ] [ javafaq.html ] [ javafaq ]
        3. (News):
        4. (Samples): local: [ ../cs320/java/ ]

          remote: [ index.html ] [ free-counters.htm ] [ ~espresso ] [ http://www.w3.org/pub/WWW/OOP/9606_Workshop/ ] [ phoneCase.html ] [ wallstreetweb ] [ index.html ] [ http://www.inch.com/~friskel/ ] [ http://www.gamelan.com/ ] [ http://www.inmet.com/java.html/ ] [ algintro.html ] [ index.html ]

        5. (Documentation): local: [ Glossary ] [ java.class.tree.html ] [ java.classes.html ] [ java.glossary.html ] [ java.html ] [ java.lang.System.html ] [ java.packages.html ] [ java.semantics.html ] [ java.syntax.html ] [ java.www.sites.html ] [ See Also ]

          remote: [ http://java.sun.com/ ] = [ http://www.applets.com/ ] , . . . For more general information see the Java and HotJava Documentation [ documentation.html ] and in particular the goals of Java [ index.html ] and the Java Tutorial at Sun.com [ http://java.sun.com/tutorial/ ]

          A programmer's guide: [ index.html ]

        . . . . . . . . . ( end of section Pointers to WWW information on the Java Language) <<Contents | End>>

        The Source Code

        News and Announcements

        [ http://www.cnet.com/Content/News/ ]

        The Java announcements archive [ http://wuarchive.wustl.edu/packages/java/ ] plus my local archives of announcements: [ java.www.sites.html ] (after July 29th 1996) [ old.java.www.sites.html ] (before July 29th 1996)

        The Java Newbie FAQs from Usenet comp.lang.java: [ ../doc/java.newbie.FAQ.txt ]

        Elliotte Rusty Harold's Official Frequently Asked Questions [ javafaq.html] .

        Also see TeamJAVA [ http://www.teamjava.com:80/links/ ] and HowDoI at Digital Focus: [ howdoi.html ] Also see Earthweb's Java Directory on www.Gamelan.com [ http://www.gamelan.com/ ]

        I culled a few common questions and answers in [ java.FAQ ] but these are very rough and ready as yet, and not official FAQs for Java. Also see the uneditted version: [ java.mbox ]

        USENET NewsGroups(also on Google groups)
        (newsgroups):
        (computer Language): comp.lang.java.announce comp.lang.java.security comp.lang.java.programmer comp.lang.java.tech comp.lang.java.misc comp.lang.java.advocacy comp.lang.java.setup comp.lang.java.corba comp.lang.java


        (Setting the class path): java [ classpath-linux.html ]
        (tools): alt.www.hotjava comp.compilers.tools.javacc

        Tutorials

        Locally: Under redevelopment.

        At Fairfield: [ java.html ]

        Marty Hall's Tutorials [ #Tutorials ]

        Books

        Errata for "Java in 21 Days" [ errata.html ]

        Examples etc for "Java in a Nutshell" //ftp.ora.com/published/oreilly/nutshell/java/

        Local information on objects in general [ objects.html ] , . . . information on language including Java [ Java in languages ] , . . . and notes and links about software engineering in general [ se.www.sites.html ]

        Source Code Examples

        [ http://www.Planet-Source-Code.com/PlanetSourceCode/ ]

      . . . . . . . . . ( end of section See also) <<Contents | End>>

      Trivia


      (CAFEBABE): On UNIX a compiled class can be recognized because it will contain a magic string of bytes that spell out in hexadecimal 0xCAFEBABE.

      The Naming of Java

      Some think it means "Just Another Vague Acronym".

      The name "Java" is not an acronym. The original name was "Oak", after the tree outside the developers window, but it turned out that "Oak" was already copyrighted/trademarked/in-use. The descriptions of the next stage vary but all indicate some kind of brainstorming session and/or a local coffee shop, during which name "Java" was proposed and accepted.

    . . . . . . . . . ( end of section The Java Programming Language) <<Contents | End>>

End