Anonymous avatar Anonymous committed 102af84

Initial checkin

Comments (0)

Files changed (25)

doc/ug/bsh-ug-content.html

+<HTML>
+<HEAD>
+   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+   <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (Win95; I) [Netscape]">
+   <TITLE>BeanShell User's Guide</TITLE>
+</HEAD>
+<BODY>
+
+<H1>
+BeanShell User's Guide</H1>
+
+<H2>
+<A NAME="Introduction"></A>Introduction</H2>
+This guide explains how to use the BeanShell Java interpreter with the
+Java Development Environment for Emacs. This guide contains the following
+sections:
+<BR>&nbsp;
+<BR>&nbsp;
+<TABLE BORDER=0 WIDTH="100%" >
+<TR>
+<TD><A HREF="#About">About the BeanShell</A>&nbsp;</TD>
+
+<TD>Brief overview of the BeanShell&nbsp;</TD>
+</TR>
+
+<TR>
+<TD VALIGN=TOP><A HREF="#Using">Using the BeanShell</A>&nbsp;</TD>
+
+<TD>Explains how to start and shut down the BeanShell, enter statements,
+and show results.</TD>
+</TR>
+
+<TR>
+<TD VALIGN=TOP><A HREF="#LanguageRef">The BeanShell Language</A>&nbsp;</TD>
+
+<TD>Describes the Java constructs and scripting extensions supported by
+the BeanShell</TD>
+</TR>
+
+<TR>
+<TD><A HREF="#CommandRef">BeanShell Commands</A>&nbsp;</TD>
+
+<TD>Describes the commands supported by the BeanShell</TD>
+</TR>
+</TABLE>
+&nbsp;
+<H2>
+<A NAME="About"></A>About the BeanShell</H2>
+The BeanShell is a Java interpreter that evaluates Java statements directly
+(without first compiling them). The&nbsp; BeanShell has been included in
+the JDE with the permission of its author,&nbsp; <A HREF="mailto:pat@pat.net">Pat
+Niemeyer</A>.
+
+<P>The BeanShell can operate as a stand-alone application or as a part
+of another application. When running as a stand-alone application, the
+interpreter accepts input from the command line of the shell in which it
+runs. The BeanShell distribution includes a shell for running the interpreter.
+It can, however, be run from other shells, such as bash or the DOS command
+window. The JDE includes a command for running the BeanShell in an Emacs
+shell (comint) buffer. This enables you to interact with the interpreter
+directly while developing Java programs.
+
+<P>The JDE also&nbsp; uses the interpreter to implement some JDE commands.
+The JDE invokes the interpreter via Lisp functions that pass Java statements
+to the interpreter via the standard input of the interpreter process and
+retrieve results via the standard output. This guide documents BeanShell
+functionality that seems relevant to JDE users.&nbsp; See the <A HREF="http://www.ooi.com/beanshell/">BeanShell
+home page</A> home page for additional information and to download the
+latest version of the BeanShell.
+<H2>
+<A NAME="Using"></A>Using the BeanShell</H2>
+
+<H3>
+<A NAME="Starting"></A>Starting the BeanShell</H3>
+To start the BeanShell, select <B><FONT SIZE=-1>Interpret</FONT></B> from
+the <B><FONT SIZE=-1>JDE</FONT></B> menu or enter the command <TT>M-x bsh</TT>.
+Emacs starts the BeanShell, if not already started, and displays its prompt
+in an Emacs shell buffer window.
+
+<P><IMG SRC="images/BeanShellBuffer.gif" HEIGHT=536 WIDTH=664>
+
+<P>The JDE allows you to run only one instance of the BeanShell at a time.
+If&nbsp; an instance is already running, the <TT>bsh</TT> command simply
+displays the buffer containing the instance, without starting another instance.
+Note that you can indirectly start a BeanShell instance when you invoke
+commands implemented as hybrid Lisp/Java scripts, such as <TT>jde-wiz-override-method</TT>.
+Such commands start a BeanShell instance if one is not already running.
+<H3>
+<A NAME="Evaluating"></A>Evaluating Statements</H3>
+To evaluate a Java statement, type it at the BeanShell prompt and press
+the <B><FONT SIZE=-1>Enter</FONT></B> key. The BeanShell evaluates the
+statement. When it is done, it redisplays the the BeanShell command prompt.
+You can then enter another statement.
+
+<P>Statements must conform to Java syntax. For example, simple statements
+must end in a semicolon. Compound statements, such as if-then constructs,
+must end in a right brace. Statements may span multiple lines. To continue
+a statement on a new line, press the <B><FONT SIZE=-1>Enter</FONT></B>
+key. The BeanShell does not evaluate the statement until you have entered
+the last line of the statement.
+
+<P><IMG SRC="images/BshMultiLineEx.gif" HEIGHT=264 WIDTH=576>
+<BR>&nbsp;
+<H3>
+<A NAME="Displaying"></A>Displaying Results</H3>
+You can display the results of evaluating Java statements via the BeanShell
+<TT>print</TT> and <TT>show</TT> commands. The print command accepts any
+Java expression as an argument and displays the result of evaluating that
+expression&nbsp; in the BeanShell window. For example,
+<BLOCKQUOTE><TT>print(2+2);</TT></BLOCKQUOTE>
+displays
+<BLOCKQUOTE><TT>4</TT></BLOCKQUOTE>
+in the BeanShell window. Note that <TT>print(expr)</TT> is equivalent to
+<TT>System.out.println(expr)</TT> and you can use either method to print
+a Java expression.
+
+<P>The <TT>show();</TT> command toggles automatic display of the results
+of evaluating statements as they are entered.
+<H3>
+<A NAME="Exiting"></A>Exiting the Shell</H3>
+To exit the BeanShell, enter
+<BLOCKQUOTE><TT>exit();</TT></BLOCKQUOTE>
+at the commmand prompt.
+<H2>
+<A NAME="LanguageRef"></A>The BeanShell Language</H2>
+
+<H3>
+<A NAME="JavaSupport"></A>Java Language Support</H3>
+The BeanShell language includes most of the constructs of the Java language.
+Standard Java constructs supported by the BeanShell include&nbsp; variable
+assignments, method calls, math expressions, for-loops, etc.. Here are
+some examples:
+<PRE>&nbsp;&nbsp;&nbsp; // Use a hashtable
+&nbsp;&nbsp;&nbsp; Hashtable h = new Hashtable();
+&nbsp;&nbsp;&nbsp; Date d = new Date();
+&nbsp;&nbsp;&nbsp; h.put("today", d);
+
+&nbsp;&nbsp;&nbsp; // Print the current clock value
+&nbsp;&nbsp;&nbsp; print( System.currentTimeMillis() );
+
+&nbsp;&nbsp;&nbsp; // Loop
+&nbsp;&nbsp;&nbsp; for (int i=0; i&lt;5; i++)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(i);
+
+&nbsp;&nbsp;&nbsp; // Pop up an AWT frame with a button in it
+&nbsp;&nbsp;&nbsp; Button b = new Button("My Button");
+&nbsp;&nbsp;&nbsp; Frame f = new Frame("My Frame");
+&nbsp;&nbsp;&nbsp; f.add(b, "Center");
+&nbsp;&nbsp;&nbsp; f.pack();
+&nbsp;&nbsp;&nbsp; f.show();</PRE>
+By default, the BeanShell imports the Java core classes at startup. You
+can import additional classes, using standard Java import syntax, for example,
+<BLOCKQUOTE><TT>import mypackage.*;</TT></BLOCKQUOTE>
+or
+<PRE>&nbsp;&nbsp;&nbsp; import mypackage.MyClass;</PRE>
+
+<H3>
+<A NAME="ScriptExtensions"></A>Scripting Extensions</H3>
+The BeanShell defines a number of extensions to the Java language designed
+to facilitate creation of scripts.&nbsp; The scripting extensions include
+<UL>
+<LI>
+Script Variables</LI>
+
+<LI>
+Script Methods</LI>
+
+<LI>
+Implicit Objects</LI>
+
+<LI>
+Syntax for accessing Bean properties and Hashtable entries</LI>
+</UL>
+
+<H3>
+<A NAME="ScriptVariables"></A>Script Variables</H3>
+The BeanShell allows you to create a special type of variable named a script
+variable. Unlike a standard Java variable, which can reference objects
+only of a specified type, a script variable can be defined to reference
+any type of object, including primitive types, such as <TT>int</TT> and
+<TT>boolean</TT>. You create a script variable by declaring it with or
+without a type specifier. If you include a type specifier, the variable
+can reference only values of the specified type. If you do not specify
+a type, the variable can reference values of any type. For example, the
+following statement
+<PRE>&nbsp;&nbsp;&nbsp; foo = new Button("Another Button");</PRE>
+creates an untyped script variable named <TT>foo</TT> and assigns it a
+Button object. You are&nbsp; free to subsequently assign <TT>foo</TT> to
+any other type of object.
+<H4>
+Predefined Variables</H4>
+
+<UL>
+<LI>
+<B>$_</B> - the value of the last expression evaluated.</LI>
+
+<LI>
+<B>bsh.Console bsh.console</B> - The primary console, if one exists.</LI>
+
+<LI>
+<B>java.awt.AppletContext bsh.appletcontext</B> - the applet context, if
+one exists.</LI>
+
+<LI>
+<B>String bsh.cwd</B> - used by the cd() and dir() commands.</LI>
+
+<LI>
+<B>boolean bsh.show</B> - used by the show() command.</LI>
+
+<LI>
+<B>boolean bsh.interactive</B> - is this interpreter running in an interactive
+mode or sourcing a file?</LI>
+
+<LI>
+<B>boolean bsh.evalOnly</B> - Does this interpreter have an input stream
+or is it only serving as a bag for eval() operations.</LI>
+</UL>
+
+<H4>
+Undefined variables</H4>
+You can test to see if a variable is "undefined" with the value <TT>void</TT>,
+e.g.:
+<PRE>&nbsp;&nbsp;&nbsp; if ( foobar == void )
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // undefined</PRE>
+You can return a defined variable to the undefined state using the unset()
+command:
+<BLOCKQUOTE><TT>a == void;&nbsp; // true</TT>
+<BR><TT>a=5;</TT>
+<BR><TT>unset("a"); // note the quotes</TT>
+<BR><TT>a == void;&nbsp; // true</TT></BLOCKQUOTE>
+
+<H3>
+<A NAME="ScriptMethods"></A>Script Methods</H3>
+BeanShell lets you define and use a special type of method called a script
+method. Script methods differ from standard Java methods in the following
+ways:
+<UL>
+<LI>
+Script methods are methods of an implicit, typeless object</LI>
+
+<LI>
+Script methods can be defined to accept and return values of any type</LI>
+
+<LI>
+Script methods can define other script methods</LI>
+</UL>
+You use standard Java syntax to declare a script&nbsp; method that accepts
+and returns specific types. For example, the following code
+<PRE>&nbsp;&nbsp;&nbsp; int addTwoNumbers( int a, int b ) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return a + b;
+&nbsp;&nbsp;&nbsp; }</PRE>
+defines a BeanShell method called <TT>addTwoNumbers</TT> that accepts and
+returns values of type <TT>int</TT>. The next example
+<PRE>&nbsp;&nbsp;&nbsp; int a = addTwoNumbers( 5, 7 );</PRE>
+uses the newly defined method to add two values of type <TT>int</TT>.
+
+<P>You define an untyped script method by omitting type specifications.
+For example, the following statement
+<PRE>&nbsp;&nbsp;&nbsp; add( a, b ) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return a + b;
+&nbsp;&nbsp;&nbsp; }</PRE>
+defines a script method that accepts arguments of any type. When you invoke
+an untyped script method, BeanShell interprets the method based on the
+types of the arguments that you pass to the method. Consider, for example,
+the following invocations of the untyped add method defined in the preceding
+example:
+<PRE>&nbsp;&nbsp;&nbsp; foo = add(1, 2);
+&nbsp;&nbsp;&nbsp; print( foo ); // 3
+
+&nbsp;&nbsp;&nbsp; foo = add("Oh", " baby");
+&nbsp;&nbsp;&nbsp; print( foo ); // Oh baby</PRE>
+The first invocation returns the result of adding, the second, of concatenating
+the arguments.
+
+<P>Methods with unspecified return types may return any type of object
+or no object. A return statement is optional. If omitted, the method returns
+the value of the last statement or expression in the method body.
+<H4>
+Method Namespace</H4>
+The namespaces of script methods and variables are separate. Thus, you
+can define a method and a variable having the same name.
+<H4>
+Nested Methods</H4>
+Script methods may define methods, for example,
+<PRE>&nbsp;&nbsp;&nbsp; foo() {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bar() {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
+&nbsp;&nbsp;&nbsp; }</PRE>
+Method may be nested in this way to an arbitrary depth. Within a nested
+method, locally declared variables and methods&nbsp; shadow identically
+named variables and methods declared in outer methods. Otherwise, variables
+and methods are visible to an arbitrary depth of scope. Outer methods can
+invoke methods defined by inner methods that return a <TT>this</TT> object,
+for example,
+<H3>
+<A NAME="ImplicitObjects"></A>Implicit Objects</H3>
+The methods and variables defined by a script method are considered to
+be methods and fields of an implicit object. The reserved identifiers,
+<TT>this</TT>, <TT>super</TT>, and <TT>global</TT>, refer, respectively,
+to the current object, the calling object, and the global object. A method
+can access any variable or method in these scopes by qualifying the variable's
+name with the name of the appropriate implicit object.
+<PRE>&nbsp;&nbsp;&nbsp; a = 42;
+&nbsp;&nbsp;&nbsp; foo() {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a = 97;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print( a );
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print( this.a );
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print( super.a );
+&nbsp;&nbsp;&nbsp; }
+
+&nbsp;&nbsp;&nbsp; foo();&nbsp; // prints 97, 97, 42</PRE>
+A script method can return its implicit object, thereby allowing the invoking
+script to access variables and methods defined by the method, using standard
+Java&nbsp; "." notation. For example,
+<PRE>&nbsp;&nbsp;&nbsp; foo() {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int a = 42;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bar() {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print("The bar is open!");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bar();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this;
+&nbsp;&nbsp;&nbsp; }
+
+&nbsp;&nbsp;&nbsp; obj = foo();&nbsp;&nbsp;&nbsp;&nbsp; // prints "the bar is open!"
+&nbsp;&nbsp;&nbsp; print ( obj.a )&nbsp; // 42
+&nbsp;&nbsp;&nbsp; obj.bar();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // prints "the bar is open!"</PRE>
+
+<H4>
+Using Implicit Objects as AWT Event Handlers</H4>
+Implicit method objects can serve as AWT event handlers. To handle an AWT
+event, a script method defines the appropriate event-handling method and
+then registering its implicit (<TT>this</TT>) object with the object in
+which the event originates. For example, the following script
+<PRE>&nbsp;&nbsp;&nbsp; button = new java.awt.Button("foo!");
+
+&nbsp;&nbsp;&nbsp; actionPerformed( event ) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print( event );
+&nbsp;&nbsp;&nbsp; }
+
+&nbsp;&nbsp;&nbsp; button.addActionListener( this );
+&nbsp;&nbsp;&nbsp; frame( button );&nbsp; // show it</PRE>
+defines an Action event handler and registers it with a button.
+
+<P>Remember that you don't have to define all of your event handlers globally.
+You can handle events in any bsh object scope. For example, the following
+method creates a button that displays a message when pushed:
+<PRE>&nbsp;&nbsp;&nbsp; messageButton( message ) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b = new Button("Press Me");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b.addActionListener( this );
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; frame(b);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; actionPerformed( e ) {
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print( message );
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
+&nbsp;&nbsp;&nbsp; }
+
+&nbsp;&nbsp;&nbsp; messageButton("Hey you!");
+&nbsp;&nbsp;&nbsp; messageButton("Another message...");</PRE>
+The above will create two buttons and each will display its own message
+when pushed. Each has a separate instance of the event handler object.
+Note too that we could return a 'this' reference from the handler method
+and use it in other contexts to register listeners...
+<H4>
+Using Implicit Objects as Threads</H4>
+'This' type references also implement the standard Runnable interface,
+so you can declare a "run()" method in your objects:
+<BLOCKQUOTE>&nbsp;<TT>&nbsp;&nbsp; foo() {</TT>
+<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; run() {</TT>
+<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+// do work...</TT>
+<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</TT>
+<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this;</TT>
+
+<P><TT>&nbsp;&nbsp;&nbsp; }</TT>
+<BR><TT>&nbsp;</TT>
+<BR><TT>&nbsp;&nbsp;&nbsp; foo = foo();</TT>
+<BR><TT>&nbsp;&nbsp;&nbsp; new Thread( foo ).start();</TT>
+<BR>&nbsp;</BLOCKQUOTE>
+
+<H4>
+Implicit Object Members</H4>
+Implicit objects have four "magic" members:
+<BLOCKQUOTE>
+<DIR>
+<LI>
+<TT>this.interpreter</TT> refers to the currently executing BeanShell Interpreter
+object.</LI>
+
+<LI>
+<TT>this.namespace</TT> refers to the BeanShell NameSpace object of the
+current context.</LI>
+
+<LI>
+<TT>this.variables</TT> refers to an array of strings listing the variables
+defined in this namespace.</LI>
+
+<LI>
+<TT>this.methods</TT> refers to an array of strings listing the methods
+defined in this namespace.</LI>
+</DIR>
+</BLOCKQUOTE>
+These are mainly for internal use by BeanShell commands. Note that there
+are certain special situations in which the <TT>this.interpreter</TT> reference
+may not be available, such as in AWT event handlers.
+<H3>
+<A NAME="PropSyntax"></A>Extended Syntax for Accessing Bean Properties
+and Hashtables Entries</H3>
+You may use the following syntax
+<BLOCKQUOTE><TT>x{name}</TT></BLOCKQUOTE>
+to access properties of Java beans and Hashtable entries, where <TT>x</TT>
+is a bean or Hashtable and <TT>name</TT> is a String that identifies a
+bean property or hashtable entry, for example:
+<PRE>&nbsp;&nbsp;&nbsp; b = new java.awt.Button();
+&nbsp;&nbsp;&nbsp; b{"label"} = "my button";
+&nbsp;&nbsp;&nbsp; // Equivalent to: b.setLabel("my button");
+
+&nbsp;&nbsp;&nbsp; h = new Hashtable();
+&nbsp;&nbsp;&nbsp; h{"foo"} = "bar";
+&nbsp;&nbsp;&nbsp; // Equivalent to: h.put("foo", "bar");</PRE>
+
+<H2>
+<A NAME="CommandRef"></A>BeanShell Commands</H2>
+The BeanShell provides a set of commands for displaying data, invoking
+system utilities, and performing various other tasks. See the BeanShell
+Command Reference for a description of the syntax and usage of each command.
+The current crop of bsh commands follow. These are, for the most part,
+just very short bsh scripts, supplied in the bsh.jar file. See <A HREF="#making">making
+bsh commands</A> below for more details on adding to the "built-in" bsh
+command set.
+<BR>&nbsp;
+<BR>
+<HR>
+<H3>
+<A NAME="bgCommand"></A>bg</H3>
+<TT>bg( String script )</TT>
+
+<P>This is like <TT>run()</TT> except that it runs the command in its own
+thread. Returns the thread object (for <TT>stop()</TT>ing, <TT>join()</TT>ing,
+etc.)
+<BR>
+<HR>
+<H3>
+<A NAME="BrowseClassCommand"></A>browseClass</H3>
+<TT>void browseClass(String classname);</TT>
+
+<P>Displays a class browser. The browser enables you to browse the contents
+of any packages packaged as <TT>jar</TT> files on the classpath defined
+by <TT>jde-global-classpath</TT>.
+<BR>&nbsp;
+<BR>
+<HR>
+<H3>
+<A NAME="catCommand"></A>cat</H3>
+<TT>void cat( String filename )</TT>
+
+<P>Print the contents of filename (like Unix cat)
+<BR>
+<HR>
+<H3>
+<A NAME="cdCommand"></A>cd</H3>
+<TT>void cd(String dirname);</TT>
+
+<P>Change working directory for the <TT>dir()</TT> command (like Unix <TT>cd</TT>).
+<BR>&nbsp;
+<BR>
+<HR>
+<H3>
+<A NAME="consoleCommand"></A>console</H3>
+<TT>bsh.Console console()</TT>
+
+<P>Create a console window attached to the current interpreter. Returns
+the console Frame.
+<BR>
+<HR>
+<H3>
+<A NAME="dirCommand"></A>dir</H3>
+<TT>void dir(String dirname)</TT>
+
+<P>Display the contets of directory dirname. The format is similar to the
+Unix ls -l command.
+<BR>
+<HR>
+<H3>
+<A NAME="debugCommand"></A>debug</H3>
+<TT>void debug()</TT>
+
+<P>Toggle on and off debug mode... Note: debug output is verbose and gross.
+<BR>
+<HR>
+<H3>
+<A NAME="EditorCommand"></A>editor</H3>
+
+<DL>
+<DT>
+<TT>Frame Frame editor();</TT></DT>
+</DL>
+
+
+<P>Create an editor window with an "eval" button. This is primarily useful
+for typing multi-line commands and experimenting with methods when running
+the BeanShell outside of the Emacs environment. Returns the editor Frame.
+<BR>
+<HR>
+<H3>
+<A NAME="evalCommand"></A>eval</H3>
+<TT>void eval( String expression )</TT>
+
+<P>Evaluate the string in the current interpreter (see <TT>source</TT>).
+<BR>
+<HR>
+<H3>
+&nbsp;<A NAME="execCommand"></A><B>exec</B></H3>
+
+<DL>
+<DT>
+<TT>exec(String process);</TT></DT>
+</DL>
+
+
+<P>Get the Java Runtime and start the external process, display any output.
+<BR>
+<HR>
+<H3>
+<A NAME="exitCommand"></A>exit</H3>
+<TT>void exit()</TT>
+
+<P>Call System.exit(0);
+<BR>
+<HR>
+<H3>
+<A NAME="FrameCommand"></A>frame</H3>
+
+<DL>
+<DT>
+<TT>Frame frame(Component component);</TT></DT>
+</DL>
+
+
+<P>Display the component, centered and packed, in a top level Frame. Returns
+the frame. Frame takes additional steps to handle the WindowClosing AWT
+event and dispose of the frame, so that you an close the window normally.
+<BR>
+<HR>
+<H3>
+&nbsp;<A NAME="getResourceCommand"></A>getResource</H3>
+<TT>URL getResource( String path )</TT>
+
+<P>The equivalent of calling getResource() on the interpreter class in
+the bsh package. Use absolute paths to get stuff in the classpath.
+<BR>
+<HR>
+<H3>
+<A NAME="LoadCommand"></A>load</H3>
+
+<DL>
+<DT>
+<TT>Object load( String filename )</TT></DT>
+</DL>
+
+
+<P>Load a serialized Java object from filename. Returns the object.
+<BR>
+<HR>
+<H3>
+<A NAME="pathToFileCommand"></A>pathToFile</H3>
+<TT>File pathToFile( String filename )</TT>
+
+<P>Create a File object corresponding to the specified file path name,
+taking into account the bsh current working directory (bsh.cwd)
+<BR>
+<HR>
+<H3>
+<A NAME="PrintCommand"></A>print</H3>
+<TT>void print(item);</TT>
+
+<P>Print the string value of the item. item may be of any type.
+<BR>
+<HR>
+<H3>
+<A NAME="pwdCommand"></A><B>pwd</B></H3>
+
+<DL>
+<DT>
+<TT>void pwd();</TT></DT>
+</DL>
+
+
+<P>Print the bsh working directory. This is the cwd obeyed by all the unix
+like bsh comands.
+<BR>
+<HR>
+<H3>
+<A NAME="rmCommand"></A>rm</H3>
+<TT>void rm( String pathname );</TT>
+
+<P>Remove the file (like Unix rm)
+<BR>
+<HR>
+<H3>
+<A NAME="runCommand"></A>run</H3>
+<TT>run( String script )</TT>
+
+<P>run() is like source() except that it runs the command in a new, subordinate
+and prune()'d namespace. So it's like "running" a command instead of "sourcing"
+it ;)
+<BR>
+<HR>
+<H3>
+<A NAME="SaveCommand"></A>save</H3>
+<TT>void save(Component component, String filename);</TT>
+
+<P>Save a serializable Java object to filename.
+
+<P>Since the AWT Button class happens to be serializable, we could test
+drive the save() command.
+<PRE>&nbsp;&nbsp;&nbsp; save(foo, "myButton.ser");</PRE>
+If we did save our button, we could revive it later with the load() command.
+<BR>&nbsp; <TT>bar = load("myButton.ser");</TT>
+<BR><TT>frame(bar);</TT>
+<BR>
+<HR>
+<H3>
+&nbsp;<A NAME="serverCommand"></A>server</H3>
+<TT>void server( int port )</TT>
+
+<P>Create a <A HREF="file:///D|/jde-dev/doc/guide.html#server">Server Mode</A>
+server attached to the current interpreter, listening on the specified
+port.
+<BR>
+<HR>
+<H3>
+&nbsp;<A NAME="setFontCommand"></A>setFont</H3>
+<TT>Font setFont( Component comp, int ptsize )</TT>
+
+<P>Change the point size of the font on the specified component, to ptsize.
+<BR>
+<HR>
+<H3>
+<A NAME="ShowCommand"></A>show</H3>
+<TT>void show();</TT>
+
+<P>Toggle on or off the display of the value of expressions evalauted on
+the command line. Show mode may be useful if you find yourself typing print()
+a lot.
+<BR>
+<HR>
+<H3>
+<A NAME="sourceCommand"></A>source</H3>
+<TT>void source( String filename )</TT>
+
+<P>Read filename into the interpreter and evaluate it in the current namespace.
+Like Bourne Shell "." command.
+<BR>
+<HR>
+<H3>
+<A NAME="unsetCommand"></A>unset</H3>
+<TT>void unset(String name);</TT>
+
+<P>"undefine" the variable specified by 'name' (So that it tests == void).
+<BR>&nbsp;
+<H2>
+<A NAME="MakeCommands"></A>Making BeanShell Commands</H2>
+Adding to the set of "prefab" commands supplied with bsh can be about as
+easy as writing any other bsh methods. You simply have to place your bsh
+scripts in a bsh/commands/ directory in the classpath (or inside the JAR
+file).
+
+<P>&nbsp;
+<BR>&nbsp;
+</BODY>
+</HTML>

doc/ug/bsh-ug-toc.html

+<HTML>
+<HEAD>
+   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+   <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (Win95; I) [Netscape]">
+</HEAD>
+<BODY>
+
+<H2>
+Contents</H2>
+
+<TABLE BORDER=0 COLS=1 WIDTH="100%" >
+<TR>
+<TD><FONT SIZE=-1><A HREF="bsh-ug-content.html#Introduction" target="content">Introduction</A></FONT></TD>
+</TR>
+
+<TR>
+<TD><FONT SIZE=-1><A HREF="bsh-ug-content.html#About" target="content">About
+the BeanShell</A></FONT></TD>
+</TR>
+
+<TR>
+<TD><FONT SIZE=-1><A HREF="bsh-ug-content.html#Using" target="content">Using
+the BeanShell</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#Starting" target="content">Starting
+the BeanShell</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#Evaluating" target="content">Evaluating
+Statements</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#Displaying" target="content">Displaying
+Results</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#Exiting" target="content">Exiting
+the BeanShell</A></FONT></TD>
+</TR>
+
+<TR>
+<TD><FONT SIZE=-1><A HREF="bsh-ug-content.html#LanguageRef" target="content">BeanShell
+Language</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#JavaSupport" target="content">Java
+Language Support</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#ScriptExtensions" target="content">Scripting
+Extensions</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp; </TT><A HREF="bsh-ug-content.html#ScriptVariables" target="content">Script
+Variables</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp; </TT><A HREF="bsh-ug-content.html#ScriptMethods" target="content">Script
+Methods</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp; </TT><A HREF="bsh-ug-content.html#ImplicitObjects" target="content">Implicit
+Objects</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#PropSyntax" target="content">Property
+Syntax</A></FONT></TD>
+</TR>
+
+<TR>
+<TD><FONT SIZE=-1><A HREF="bsh-ug-content.html#CommandRef" target="content">BeanShell
+Commands</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#bgCommand" target="content">bg</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#BrowseClassCommand" target="content">browseClass</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#catCommand" target="content">cat</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#cdCommand" target="content">cd</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#consoleCommand" target="content">console</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#dirCommand" target="content">dir</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#debugCommand" target="content">debug</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#EditorCommand" target="content">editor</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#evalCommand" target="content">eval</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#execCommand" target="content">exec</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#exitCommand" target="content">exit</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#FrameCommand" target="content">frame</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#getResourceCommand" target="content">getResource</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#LoadCommand" target="content">load</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#pathToFileCommand" target="content">pathToFile</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#PrintCommand" target="content">print</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#rmCommand" target="content">rm</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#runCommand" target="content">run</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#SaveCommand" target="content">save</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#serverCommand" target="content">server</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#setFontCommand" target="content">setFont</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#ShowCommand" target="content">show</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#sourceCommand" target="content">source</A></FONT>&nbsp;
+<BR><FONT SIZE=-1><TT>&nbsp;</TT><A HREF="bsh-ug-content.html#unsetCommand" target="content">unset</A></FONT>&nbsp;</TD>
+</TR>
+
+<TR>
+<TD><FONT SIZE=-1><A HREF="bsh-ug-content.html#MakeCommands" target="content">Making
+BeanShell Commands</A></FONT>&nbsp;</TD>
+</TR>
+</TABLE>
+&nbsp;
+</BODY>
+</HTML>

doc/ug/bsh-ug.html

+<html>
+
+<head>
+<title>BeanShell User's Guide</title>
+</title>
+
+<frameset cols="25%,75%" frameborder="no">
+<frame src="bsh-ug-toc.html" name="toc" marginwidth="3" marginheight="3" scrolling="auto">
+<frame src="bsh-ug-content.html" name="content" marginwidth="0" marginheight="0" scrolling="auto">
+<noframes>
+<body>
+<p>
+<A HREF="bsh-ug-toc.html">JDE Topics</A>
+</p>
+</body>
+</noframes>
+</frameset>
+
+
+</html>

doc/ug/jdb-guide.html

+<html>
+
+<head>
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1">
+<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
+<title>Debugging with jdb</title>
+</head>
+
+<body bgcolor="#FFFFFF">
+
+<h1><a name="DebuggingWithJdb"</a>Debugging with jdb</h1>
+
+<p>To debug an application: </p>
+
+<ol>
+    <li>Use <tt>jde-db-set-source-paths</tt> to specify the paths
+        of any source code that you expect to visit while
+        debugging your application (see <a
+        href="#SpecifyingSourceCodePaths">Specifying Source Code
+        Paths</a>). If you suspect that a problem is occurring in
+        the Java API, you should include the API source files in
+        your source path.</li>
+    <li>Compile your source files with the <tt>-g</tt> option
+        (see <a href="#CompilingJavaPrograms">Compiling Java
+        Programs</a>). This causes the compiler to insert
+        information needed by the debugger into your
+        application's class files.</li>
+    <li>Specify the app's main class either by running the <tt>jde-run-set-app</tt>
+        command (you need only do this once) or by starting the
+        debugger from the buffer that contains the source file
+        for the main class.</li>
+</ol>
+
+<h3>Starting the Debugger</h3>
+
+<p>To start the debugger, run the <tt>jde-db</tt> command (<font
+size="2"><b>JDE-&gt;Debug</b></font>, <tt>C-c C-v C-d</tt>). The
+JDE splits the Emacs window into two frames. One shows the
+debugger interaction buffer. The other frame displays your
+application's main method. An arrow (=&gt;) points to the main
+method's first line. The menu bar of the source buffer displays a
+menu (<font size="2"><b>Jdb</b></font>) of debug commands. </p>
+
+<p>&nbsp;<img src="images/debug1.gif" width="601" height="457"> </p>
+
+<h4>Setting Debugger Options Interactively</h4>
+
+<p>If you set the customization variable <tt>jde-db-read-vm-args</tt>
+to a non-<tt>nil</tt> value, the JDE compile command prompts you
+to enter debugger options in the minibuffer. It appends the
+options that you enter to the options specified via customization
+variables. The JDE saves the arguments that you enter in a
+minibuffer history list. You can recall previously entered
+options by pressing the up or down arrows on your keyboard. </p>
+
+<h4>Setting Command-Line Application Arguments Interactively</h4>
+
+<p>If you set the customization variable <tt>jde-db-read-app-args</tt>
+to a non-<tt>nil</tt> value, the JDE compile command prompts you
+to enter command-line application arguments in the minibuffer. It
+appends the options that you enter to the arguments specified via
+the customization variable <tt>jde-db-option-application-args</tt>.
+The JDE saves the arguments that you enter in a minibuffer
+history list. You can recall previously entered options by
+pressing the up or down arrows on your keyboard. </p>
+
+<h3>Entering Debugger Commands</h3>
+
+<p>The JDE lets you enter commands from either the current source
+buffer or from the debugger command-line interaction buffer. You
+can enter all debugger commands from the debugger buffer. You can
+enter only a subset of debugger commands from the current source
+buffer. </p>
+
+<h4>Entering Commands from the Current Source Buffer</h4>
+
+<p>The current source buffer is the buffer in which your program
+is currently halted (initially the buffer containing the source
+for your program's main class).To enter a debugger command from
+the current source buffer, select the command from the jdb menu
+or type the shortcut key for the command. The <font size="2"><b>jdb</b></font>
+menu lists the shortcut keys for debugger commands. </p>
+
+<h4>&nbsp;Entering Commands in the Debugger Interaction Window</h4>
+
+<p>To enter a command in the debugger interaction window, type
+the command at the debugger prompt and press the <tt>Enter</tt>
+key. To see a list of debugger commands, enter the command <tt>help</tt>.
+</p>
+
+<h3>Running an Application Step-by-Step</h3>
+
+<p>Set a breakpoint at the line where you want to begin stepping
+through your program (see <a href="#SettingBreakpoints">Setting
+Breakpoints</a>). Then,&nbsp; type the <tt>run</tt> command. The
+debugger runs your program, stopping at the breakpoint. At this
+point, you can step through your code by entering commands in
+either the Java source buffer or the jdb interaction buffer. </p>
+
+<ul>
+    <li>In the source buffer, choose <font size="2"><b>Jdb-&gt;Step</b></font>
+        (<tt>C-x C-a C-s</tt>) or <font size="2"><b>Jdb-&gt;Next</b></font>
+        (<tt>C-x C-a C-n</tt>) to step into or step over the
+        current line, respectively. Select <font size="2"><b>Jdb-&gt;Continue</b></font>
+        (<tt>C-x C-a C-r</tt>) to continue to the next breakpoint
+        or to the end of your program, whichever comes first.</li>
+    <li>In the jdb buffer, enter <tt>step</tt>, <tt>next</tt>, or
+        <tt>cont</tt> at the <tt>jdb</tt> command prompt.</li>
+</ul>
+
+<p>The debugger executes the current line and stops at the next
+line. If the next line is in another source file, the debugger
+opens the source file in the source buffer (replacing the
+existing file) and positions the display at the new stopping
+point. At this point, you can enter a debugger command to display
+the value of a variable, set or clear a breakpoint, or perform
+some other operation. </p>
+
+<p><b>Note</b>. A blank source buffer indicates that the debugger
+cannot find the source file into which you have stepped. You
+should check your source path setting (see <a
+href="#SpecifyingSourceCodePaths">Specifying Source Code Paths</a>)
+to ensure that it includes all source files in the execution path
+of your program. </p>
+
+<h3><a name="SettingBreakpoints"></a>Setting Breakpoints</h3>
+
+<p>You can set breakpoints in the debugger&nbsp; buffer or the
+current source buffer. When setting breakpoints from the current
+source buffer, you can set breakpoints only in the class
+displayed in the buffer. If you want to set breakpoints at other
+points in your program, you must set them from the debugger
+interaction buffer. </p>
+
+<h4>Setting Breakpoints from the Debugger Buffer</h4>
+
+<p>The <tt>stop in</tt> command sets a breakpoint in a specified
+function. For example, </p>
+
+<pre>
+     > stop in myapp.Main.main
+</pre>
+
+<p>sets a breakpoint in the main method of <tt>myapp.Main</tt>
+class. The stop at command sets a breakpoint at a particular
+line. For example, </p>
+
+<blockquote>
+    <p><tt>&gt; stop at myapp.Main:20</tt></p>
+</blockquote>
+
+<p>sets a breakpoint at line 20 of <tt>myapp.Main</tt> class. Use
+the <tt>clear</tt> command to clear a breakpoint from a specified
+line. For example, </p>
+
+<blockquote>
+    <p><tt>&gt; clear myapp.Main:20</tt></p>
+</blockquote>
+
+<p>clears the breakpoint set at line 20 of <tt>myapp.Main</tt>. </p>
+
+<h4>Setting Breakpoints in the Source Buffer</h4>
+
+<p>To set a breakpoint on any executable line in the source file
+buffer, click on the line and select <font size="2"><b>Jdb-&gt;Set
+Breakpoint</b></font> (<tt>C-x SPC</tt>). To clear a breakpoint
+from a line in the current buffer, click on the line and select <font
+size="2"><b>Jdb-&gt;Remove Breakpoint</b></font> (<tt>C-x C-a C-d</tt>).
+</p>
+
+<h3><a name="SpecifyingSourceCodePaths"></a>Specifying Source
+Code Paths</h3>
+
+<p>The <tt>jde-db-source-directories</tt> variable specifies the
+directories the JDE should search for source for classes visited
+by the debugger as you step through your program. You can set the
+value of this variable in a customization buffer or in the
+minibuffer. </p>
+
+<h4>Using Customization to Set Source Paths</h4>
+
+<p>To use customization, select <font size="2"><b>JDE-&gt;Options-&gt;Project</b></font>
+and edit the <tt>jde-db-source-directories</tt> entry in the
+resulting customization buffer. To show the current value of the
+variable, select the <font size="2"><b>Show/Hide</b></font>
+button. To add a directory, click the last <font size="2"><b>INS</b></font>
+button in the list&nbsp; and enter the directory in the resulting
+edit field. When you are done adding entries, press the <font
+size="2"><b>State</b></font> button to set the variable. To save
+the setting in your project file, select <font size="2"><b>JDE-&gt;Options-&gt;Save
+Project</b></font>. The following figure shows an example of the <tt>jde-db-source-directories</tt>
+entry in a customization buffer. </p>
+
+<p><img src="images/debug2.gif" width="657" height="393"> <br>
+&nbsp; </p>
+
+<h4>Entering Source Paths in the Minibuffer</h4>
+
+<p>To specify the source paths in the minibuffer, enter <tt>M-x
+jde-db-set-source-paths</tt>. The JDE displays a prompt in the
+minibuffer. Enter the source paths separated by colons (on Unix
+systems) or semicolons (on Win32 systems) and press enter. The
+jde-db-set-source-paths command sets the <tt>jde-db-source-directories</tt>
+variable to the specified paths. </p>
+
+<p>You must specify the paths of the top-level directories of any
+source code that you might visit while debugging your
+application. The source code directory structure must mirror your
+app's package structure. For example, suppose that your
+application includes a set of classes packaged in the <tt>myapp</tt>
+directory. Then, the source for those classes must be reside in a
+directory named <tt>myapp</tt> and you must specify the path of <tt>myapp</tt>'s
+parent directory. </p>
+
+<p><b>Tip:</b> If you want to step through the JDK source code,
+select the source code install option when you install the JDK
+and set the&nbsp; <tt>jde-db-source-directoiries</tt> variable
+to&nbsp; the top-level directory containing the source code. The
+JDE will use the JDK's package structure to find the source code
+in the subdirectories. </p>
+
+<p><b>Tip:</b> Save the setting of <tt>jde-db-source-directories</tt>
+in your <tt>prj.el</tt> file (see <a href="#SavingProjSettings">Saving
+Project Settings</a>) to avoid having to set them every time you
+start a session. </p>
+
+<h3>Displaying Variables</h3>
+
+<p>The debugger lets you display the value of any local variable
+currently in scope. To display a variable from the debugger
+buffer, enter <tt>print x</tt> at the debugger prompt where <tt>x</tt>
+is the name of the variable whose value you want to display. The
+debugger displays the value of the variable in the debugger
+buffer. To display a local, in-scope variable whose source is
+displayed in the debugger source buffer, put the point on the
+variable and select <font size="2"><b>Jdb-&gt;Print Expression</b></font>
+or type <tt>C-x C-a C-p</tt>. To display all variables in scope,
+enter <tt>locals</tt> at the debugger command prompt in the
+debugger buffer. </p>
+
+<p>When the debugger displays a user-defined object, it prints
+the value returned by the object's <tt>toString()</tt> method. By
+default, the <tt>toString()</tt> method returns the object's id.
+You can override the <tt>toString()</tt{> </tt></p>
+
+<h3><tt>Debug Options</tt></h3>
+
+<p><tt>The JDE allows you to specify debug options by setting JDE
+configuration variables.You can use the Emacs customization
+feature to set debug variables interactively. To use the
+customization feature, select </tt><b><tt>Options-&gt;Debug</tt></b><tt>
+from the </tt><b><tt>JDE</tt></b><tt> menu. (See </tt><a
+href="#ConfiguringJDE"><tt>Configuring the JDE</tt></a><tt> for
+more information on using the customization feature). In some
+cases, the JDE also provides functions for setting the
+buffer-local values of the compilation variables. To save the
+compilation settings in the project file (see </tt><a
+href="#UsingProjectFiles"><tt>Using Project Files</tt></a><tt>)
+for the current source buffer, select </tt><b><tt>Options-&gt;Update
+Project</tt></b><tt> from the </tt><b><tt>JDE</tt></b><tt> menu. </tt></p>
+
+<p><tt>The following table lists the JDE run-time variables and
+the functions used to set them. <br>
+&nbsp; </tt></p>
+
+<table border="2" cellpadding="5" width="100%">
+    <tr>
+        <th><b><tt>Variable</tt></b><tt> </tt></th>
+        <th><b><tt>Group</tt></b><tt> </tt></th>
+        <th><b><tt>Usage</tt></b><tt> </tt></th>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-debugger</tt></td>
+        <td valign="top">Project&nbsp;</td>
+        <td valign="top">Specify debugger. The command <tt>jde-db-set-debugger</tt>
+        sets the buffer-local value of this variable.&nbsp;</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-source-directories</tt></td>
+        <td valign="top">Project&nbsp;</td>
+        <td valign="top">Specify location(s) of source files that
+        can be visited while stepping through a program. The
+        command <tt>jde-db-set-source-paths</tt> sets the
+        buffer-local value of this variable.&nbsp;</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-set-initial-breakpoint</tt></td>
+        <td valign="top">Project</td>
+        <td>If non-<tt>nil</tt>, causes the JDE to set an initial
+        breakpoint at the beginning of the application's main
+        method and run the application at debugger startup. This
+        variable is <tt>t</tt> by default. If you want to specify
+        an initial breakpoint, set this variable to <tt>nil</tt>.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-mode-hook</tt></td>
+        <td valign="top">Project&nbsp;</td>
+        <td valign="top">Customization hook for jde-db inferior
+        mode.&nbsp;</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-startup-commands</tt></td>
+        <td valign="top">Project</td>
+        <td>List of commands to run at debugger startup. This
+        variable overrides <font size="2">jde-db-set-initial-breakpoint</font>.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-marker-regexp</tt></td>
+        <td valign="top">Project</td>
+        <td>Regular expression used to recognize breakpoint
+        markers in the debugger output. This expression should
+        have two subexpressions: the first matches the name of
+        the class in which the program stopped; the second, the
+        number of the line at which the program stopped. By
+        default, this variable is set to an expression that
+        matches breakpoint markers in jdb's output.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-global-classpath</tt></td>
+        <td valign="top">Project&nbsp;</td>
+        <td valign="top">Specify class paths for compile, run,
+        and debug commands. The command<tt>
+        jde-set-global-classpath</tt> sets the buffer-local value
+        of this variable.&nbsp;</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-read-vm-args</tt></td>
+        <td valign="top">Project</td>
+        <td>Specifies whether to read debugger VM arguments from
+        the minibuffer.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-read-vm-args</tt></td>
+        <td valign="top">Project</td>
+        <td>Specifies whether to read command-line application
+        arguments from the minibuffer.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-classpath</tt></td>
+        <td valign="top">Debug&nbsp;</td>
+        <td valign="top">Specifies the classpath for&nbsp; the
+        Java interpreter. This option overrides the
+        jde-global-classpath option.&nbsp;</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-verbose</tt></td>
+        <td valign="top">Debug&nbsp;</td>
+        <td valign="top">Print messages about the running
+        process.&nbsp;</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-properties</tt></td>
+        <td valign="top">Debug&nbsp;</td>
+        <td valign="top">Specify property values.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-heap-size</tt></td>
+        <td valign="top">Debug&nbsp;</td>
+        <td valign="top">Specify the initial and maximum size of
+        the interpreter heap.&nbsp;</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-stack-size</tt></td>
+        <td valign="top">Debug&nbsp;</td>
+        <td valign="top">Specify size of the C and Java stacks.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-garbage-</tt>&nbsp; <br>
+        <tt>collection</tt>&nbsp;</td>
+        <td valign="top">Debug</td>
+        <td valign="top">Specify garbage collection
+        options.&nbsp;</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-java-profile</tt></td>
+        <td valign="top">Debug&nbsp;</td>
+        <td valign="top">Enable Java profiling.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-heap-profile</tt></td>
+        <td valign="top">Debug&nbsp;</td>
+        <td valign="top">Output heap profiling data.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-verify</tt></td>
+        <td valign="top">Debug&nbsp;</td>
+        <td valign="top">Verify classes.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-vm-args</tt></td>
+        <td valign="top">Debug&nbsp;</td>
+        <td valign="top">Specify command-line arguments to be
+        passed to the Java VM. The command <tt>jde-db-set-args</tt>
+        sets the buffer-local value of this variable.&nbsp;</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-db-option-application-args</tt></td>
+        <td valign="top">Debug&nbsp;</td>
+        <td valign="top">Specify command-line arguments to pass
+        to the application. The command <tt>jde-db-set-app-args </tt>sets
+        the buffer-local value of this variable.&nbsp;</td>
+    </tr>
+</table>
+
+</body>
+
+</html>

doc/ug/jde-ug-content.html

+<html>
+
+<head>
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1">
+<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
+<title>JDE User's Guide
+</title>
+
+<style TYPE="text/css">
+   h1 { font-family: sans-serif; font-size: x-large;}
+   h2 { font-family: sans-serif; font-size: large;
+        margin-left: .2in}
+   h3 { font-family: sans-serif; font-size: medium;
+        margin-left: .2in}
+   h4 { font-family: sans-serif;
+        margin-left: .2in}
+   p  { margin-left: .2in}
+   ul { margin-left: .4in}
+   ol { margin-left: .45in}
+   li { margin-bottom: 2%}
+</style>
+
+</head>
+
+<body bgcolor="#FFFFFF">
+
+
+<h1>JDE User's Guide</h1>
+
+<a name="Introduction"><h2>Introduction</h2></a>
+
+<p>Welcome to the <i>JDE User's Guide</i>. This guide explains
+how to use the JDE to develop Java applications and applets. The
+guide assumes that you are familiar with Emacs and JavaSoft's
+Java development tools. </p>
+
+<a name="AboutJDE"><h3>About the JDE</h3></a>
+
+<p>The Java Development Environment (JDE)&nbsp; is an Emacs Lisp
+package that interfaces Emacs to third-party Java application
+development tools, such as those provided by JavaSoft's Java
+Development Kit (JDK). The result is an integrated development
+environment (IDE) comparable in power to many commercial Java
+IDEs. Features include: </p>
+
+<ul>
+    <li>source code editing with syntax highlighting and auto
+        indendation</li>
+    <li>automatic completion of class fields and methods</li>
+    <li>compilation with automatic jump from error messages to
+        responsible line in the source code.</li>
+    <li>generates class and method skeletons automatically</li>
+    <li>run Java application in an interactive (comint) Emacs
+        buffer</li>
+    <li>integrated debugging with interactive debug command
+        buffer and automatic display of current source file/line
+        when stepping through code</li>
+    <li>browse JDK doc, using the browser of your choice</li>
+    <li>browse your source code, using the Emacs etags facility
+        or a tree-structured speedbar.</li>
+    <li>supports latest version of JavaSoft's Java Development
+        Kit</li>
+    <li>runs on any platform supported by Emacs and Sun's Java
+        SDK (e.g., Win95/NT and Solaris)</li>
+    <li>easily and infinitely customizable</li>
+    <li>works with FSF Emacs and XEmacs</li>
+</ul>
+
+<a name="JDERequirements"><h3>JDE Requirements</h3></a>
+
+<p>The JDE requires the following software: </p>
+
+<ul>
+    <li><a href="http://www.gnu.org/">FSF Emacs</a> or <a
+        href="http://www.xemacs.org/">XEmacs</a> on Unix
+        platforms; the 20.6.1 version of <a
+        href="http://www.cs.washington.edu/homes/voelker/ntemacs.html">NT/Emacs</a>
+        on Windows platforms, for general source file editing and
+        tool integration functions.</li>
+    <li><a
+        href="http://www.javasoft.com/products/jdk/1.1/index.html">Java
+        Development Kit (JDK)</a> or compatible set of Java
+        development tools (compiler, virtual machine, debugger,
+        class libraries, etc.)</li>
+    <li>Web browser (e.g., Netscape or Internet Explorer) for
+        viewing documentation.</li>
+    <li>latest versions of Eric Ludlam's speedbar and semantic bovinator packages
+        available for download from
+        <a href="http://www.ultranet.com/~zappo/semantic.shtml">Eric's home page</a></li>
+    <li><a href="http://www.cygnus.com/misc/gnu-win32/">bash</a>
+        or other Unix-style shell highly recommended for Windows95/NT
+        environments.</li>
+</ul>
+
+<a name="JDEComponents">
+<h3>JDE Components</h3>
+</a>
+
+<p>The JDE distribution includes the following files: </p>
+
+<ul>
+    <li><a href="../../lisp/jde.el"><code>jde.el</code></a>. Defines jde-mode, a major
+        Emacs mode for developing Java code.</li>
+    <li><a href="../../lisp/jde-run.el"><code>jde-run.el</code></a>. Runs Java
+        applications and applets</li>
+    <li><a href="../../lisp/jde-db.el"><code>jde-db.el</code></a>. Interfaces Emacs to
+        <code>jdb</code>, the command-line debugger that comes with the JDK.</li>
+    <li><a href="../../lisp/jde-gen.el"><code>jde-gen.el</code></a>. Contains code
+        generation templates.</li>
+    <li><code>bsh.jar</code>. Compiled files for the <a
+        href="http://www.beanshell.org/">BeanShell</a>, a
+        Java source code interpreter developed by Pat Neimeyer.</li>
+    <li><a href="../../lisp/beanshell.el"><code>beanshell.el</code></a>. Provides an
+        Emacs interface to the BeanShell interpreter.</li>
+    <li><a href="../../lisp/jde-wiz.el"><code>jde-wiz.el</code></a>. Provides &quot;wizards&quot;
+        that generate skeleton implementations of interfaces and
+        skeleton overrides of methods declared by superclasses.</li>
+    <li><a href="../../lisp/jde-complete.el"></code>jde-complete.el</code></a>. Automatic field
+        and method completion package.</li>
+    <li><a href="../../lisp/jde-parse.el"></code>jde-parse.el</code></a>. 
+        Java parser package.</li>
+    <li><a href="../../lisp/java.bnf"></code>java.bnf</code></a>. 
+        Java grammar used to generate the JDE's lisp-based Java parser.</li>
+    <li><a href="../../lisp/jde-bug.el"></code>jde-bug.el</code></a>. 
+        JDEbug user interface package.</li>
+    <li><a href="../../lisp/jde-dbs.el"></code>jde-dbs.el</code></a>. 
+        JDEbug low-level command interface package.</li>
+    <li><a href="../../lisp/jde-dbo.el"></code>jde-dbo.el</code></a>. 
+        JDEbug output processing functions.</li>
+    <li>source code, jar files, and documentation for the 
+        <a href="../../java/">Java components</a> of the JDE.</li>
+    <li><a href="../../lisp/jtags"><code>jtags</code></a> is a bash shell script that
+        tags Java source hierarchies.</li>
+    <li><a href="../../lisp/jtags.csh"><code>jtags.csh</code></a> is a c shell script
+        that tags Java source heierarchies.</li>
+</ul>
+
+<a name="LatestVersion">
+<h3>Latest Version</h3>
+</a>
+
+<p>See the <a href="http://sunsite.auc.dk/jde/">Emacs JDE Home
+Page</a> for instructions on downloading and installing the most
+recent version of the JDE. </p>
+
+<a name="ContactingAuthor">
+<h3>Contacting the Author</h3>
+</a>
+
+<p>Please send bug reports and enhancement suggestions to 
+<a href="mailto:paulk@mathworks.com">Paul Kinnucan</a>.
+</p>
+
+<a name="EditingJavaSourceFiles">
+<h2>Editing Java Source Files</h2>
+</a>
+
+<p>To edit an existing Java source file, load it into an Emacs
+buffer by executing <tt>C-x C-f</tt>. Loading a Java source file
+into a buffer causes the buffer to enter into <tt>jde-mode</tt>,
+a variant of <tt>java-mode</tt>, which is in turn a variant of
+the standard Emacs <tt>cc-mode</tt> for editing source files
+written in C and related languages. Jde mode offers all the
+specialized source file editing commands of <tt>cc-mode</tt> plus
+functions for compiling, running, and debugging Java source files.
+You can invoke the commands by selecting them from the <b>JDE</b>
+menu that <tt>jde-mode</tt> displays on the Emacs menu bar or by
+typing the commands in the Emacs minibuffer (see the figure below).
+</p>
+
+<p>&nbsp;<img src="images/JdeMenu.gif" width="600" height="360"> </p>
+
+<a name="Abbreviations">
+<h2>Using Abbreviations</h2>
+</a>
+
+<p>The JDE provides an optional abbreviation mode for Java
+keywords. When this mode is enabled, you can type an abbreviation
+and JDE replaces the abbreviation with the keyword. For example,
+in abbreviation mode, to enter the Java keyword <tt>extend</tt>,
+type <tt>ext</tt> followed by a space. The JDE&nbsp; replaces <tt>ext</tt>
+with <tt>extend</tt>. To enable abbreviation mode, select <font
+size="2"><b>JDE-&gt;Options-&gt;Project</b></font> and toggle the
+boolean variable <tt>jde-enable-abbrev-mode</tt>. To change,
+remove, or add an abbreviation, edit the variable <tt>jde-mode-abbreviations</tt>
+in the project customization buffer. &nbsp; </p>
+
+<a name="DocumentingCode">
+<h2>Documenting Code</h2>
+</a>
+
+<p>To insert a skeleton javadoc comment for a class or method, position point in the first line of the method or class and select <strong>JDE-&gt;Document</strong> from the Emacs menubar or type <code>C-c C-v j</code>.</p>
+
+<p>To customize the javadoc skeletons, select <strong>JDE-&gt;Options-&gt;Project-&gt;Javadoc</strong> from the Emacs menubar.</p>
+
+<p><strong>Note</strong> Thanks to <a href="mailto:david@dponce.com">David Ponce</a> for developing the JDE's javadoc comment generation facility.</p>
+
+<a name="GeneratingCode">
+<h2>Generating Code</h2>
+</a>
+
+<p>The JDE provides the following code generation capabilities.</p>
+
+<ul>
+  <li>Code completion</li>
+  <li>Code wizards</li>
+  <li>Code templates</li>
+</ul>
+
+<a name="CodeCompletion">
+<h3>Code completion</h3>
+</a>
+
+<p>
+To complete a partially entered field or method, type 
+<code>C-c C-v C-.</code> (<code>jde-complete-at-point</code>). If there is only
+completion for the field or method, the JDE enters the
+completion. Otherwise, the JDE displays a menu of the 
+possible completions.
+</p>
+
+<p>
+<strong>Note</strong> The JDE completion facility is a work
+in progress. The current version does not complete static methods
+or fields, methods or fields of method arguments, and 
+variables declared outside the current buffer. It also does not
+complete methods or fields defined by classes that are not on
+the current classpath. Future releases will remove most of these
+limitations.
+</p>
+
+<a name="CodeWizards">
+<h3>Code Wizards</h3>
+</a>
+
+<p>The JDE provides code generation wizards that generate class-dependent code without requiring you to supply any other information than the unqualified name of the class.</p>
+
+<p><strong>Note</strong> You may experience a slight delay the first time you invoke a wizard during an Emacs session. This is because the wizards use the Beanshell interpreter to run Java code to determine information about classes.</p>
+
+<a name="ImportWizard">
+<h4>Import Wizard</h4>
+</a>
+
+
+<p>The import wizard generates an import statement for the class name at point if an import statement does not already exist for that class. The wizard generates the import statement at the head of the source buffer.</p>
+
+<p>To import the class at point, select <strong>JDE-&gt;Wizards-&gt;Import Class</strong> from the Emacs menubar or type <code>C-c C-v C-z</code>.</p>
+
+<a name="MethodOverrideWizard">
+<h4>Method Override Wizard</h4>
+</a>
+
+<p>The method override wizard generates a skeleton method that
+overrides a similarly named method defined by a superclass. </p>
+
+<p>To override a method of a superclass: </p>
+
+<ol>
+    <li>Position the Emacs point at the location in the buffer
+        where you want the generated method to appear. <p>The
+        point must be within the class that is overriding the
+        method. </p>
+        <p><img src="images/OverrideMeth1.gif" width="472"
+        height="328"> </p>
+    </li>
+    <li>Select <b>Wizards-&gt;Override Method</b>
+        from the <font size="2"><b>JDE</b></font> menu or enter <tt>M-x
+        jde-wiz-overrided-method</tt>. <p><img
+        src="images/OverrideMeth2.gif" width="768" height="328"> </p>
+        <p>The JDE prompts you to enter the name of the method to
+        be overridden in the minibuffer. </p>
+        <p><img src="images/OverrideMeth3.gif" width="480"
+        height="328"> </p>
+        <p>The name must be the name of a method defined by an
+        ancestor of the class in which the Emacs point is located.
+        The compiled class of the ancestor must be on the
+        classpath specified by <tt>jde-global-classpath</tt>. </p>
+    </li>
+    <li>Enter the name of the method to be overridden. <p>If the
+        ancestors of the class in which you are overriding the
+        method define more than one method of the same name, the
+        wizard displays a dialog buffer that lists the methods.
+        For example, Java's awt class hierarchy defines several
+        variants of the method <tt>repaint</tt>. If you specify <tt>repaint</tt>
+        as the method to override, the JDE displays the following
+        dialog buffer: </p>
+        <p><img src="images/OverrideMeth4.gif" width="624"
+        height="456"> </p>
+        <p>The dialog buffer lists the signature of each variant
+        of the method you specified. Next to each signature is a
+        radio button. The radio button of the currently selected
+        signature contains an asterisk. To select another
+        signature, right-click the radio button next to the
+        variant. To confirm your selection and dismiss the dialog,
+        right-click the [Ok] button. </p>
+    </li>
+    <li>Select&nbsp; the method variant you want to override and
+        click the <font size="2"><b>[Ok]</b></font> button. <p>The
+        wizard inserts a skeleton implementation of the selected
+        method at the current point in the Java source buffer. </p>
+        <p><img src="images/OverrideMeth5.gif" width="480"
+        height="328"> </p>
+        <p>The wizard also inserts import statements for any
+        classes referenced by the method that are not already
+        imported by the containing class either explicitly or
+        implicitly. The wizard inserts the import statements at
+        the head of the source buffer after any existing import
+        statements, or any package statement, or the first blank
+        line in the buffer. </p>
+        <p><b>Note:</b> The method override wizard uses the
+        BeanShell to create the interface implementation. If the
+        BeanShell is not currently running, the wizard starts the
+        BeanShell. Thus, if the BeanShell is not already running,
+        you may experience a short pause the first time you
+        override a method.</p>
+    </li>
+</ol>
+
+<a name="InterfaceWizard">
+<h4>Interface Wizard</h4>
+</a>
+
+<p>This wizard creates a skeleton implementation of any interface
+defined on the classpath specified by <tt>jde-global-classpath</tt>.
+</p>
+
+<p>To create an implementation of an interface: </p>
+
+<ol>
+    <li>If the interface is to be implemented by a new class,
+        create the class in a buffer.<br>
+        </li>
+    <li>Position the Emacs point at the point in the class where
+        you want the implementation of the interface's methods to
+        appear.<br>
+        </li>
+    <li>Select <font size="2"><b>Wizards-&gt;Implement Interface</b></font>
+        from the <font size="2"><b>JDE</b></font> menu or enter <tt>M-x
+        jde-wiz-implement-interface</tt>. <p>The JDE prompts you
+        to enter the name of the interface to be implemented. </p>
+    </li>
+    <li>Enter the fully qualified name of the interface. For
+        example, <tt>java.awt.Event.MouseListener</tt>. <p>The
+        wizard inserts skeleton implementations of the methods
+        declared by the interface at the current point in the
+        current buffer. It inserts import statements for any
+        classes required by the interface at the head of the
+        current buffer (only if import statements do not already
+        exist for the required classes). It also updates or
+        creates an implements clause for the class.</p>
+    </li>
+</ol>
+
+<p><b>Note:</b> The interface wizard uses the BeanShell to create
+the interface implementation. If the BeanShell is not currently
+running, it starts the BeanShell. Thus, if the BeanShell is not
+already running, you may experience a short pause the first time
+you use the wizard. </p>
+
+<a name="CodeTemplates">
+<h3>Code Templates</h3>
+</a>
+
+<a name="BufferTemplates">
+<h4>Buffer Templates</h4>
+</a>
+
+<p>These commands create buffers containing a skeleton Java class.
+Each command prompts you to enter the path to a new Java source
+file. They then create a buffer for the new file and insert a
+template for a class of the same name as the newly created file.
+In particular, the command </p>
+
+<ul>
+    <li><font size="2"><b>Files-&gt;JDE New-&gt;Class</b></font>
+        creates a buffer containing a generic Java public class.</li>
+    <li><font size="2"><b>Files-&gt;JDE New-&gt;Console</b></font>
+        creates a buffer containing&nbsp; the main class of a
+        Java console application.</li>
+    <li><font size="2"><b>Files-&gt;JDE New-&gt;Other</b></font>
+        prompts you to create any of the above buffers or a
+        custom (user-defined) buffer.</li>
+</ul>
+
+<p>You can create an empty Java class buffer&nbsp; by selecting <font
+size="2"><b>Files-&gt;Open</b></font> (<tt>C-x C-f</tt>) and
+entering the path for a new file whose root name is the same as
+the class you want to create and whose extension is <tt>.java.</tt>
+</p>
+
+<h4>Specifying Boilerplate Text</h4>
+
+<p>You can specify boilerplate text (for example, a copyright
+notice) to be inserted at the head of class source files created
+by the JDE. The JDE provides two ways to specify the boilerplate
+text. The simplest way is to enter the lines of boilerplate text
+as the value of the customization variable <tt>jde-gen-buffer-boilerplate</tt>.
+Another way to specify the text is to set the value of the
+customization variable <tt>jde-gen-boilerplate-function </tt>to a
+function that generates the boilerplate text. (The default value
+of this variable is <tt>jde-gen-create-buffer-boilerplate</tt>,
+which returns the value of the boilerplate variable, <tt>jde-gen-buffer-boilerplate</tt>).
+The functional approach allows you to generate boilerplate text
+dynamically by evaluating the appropriate Lisp code. By saving
+the values of boilerplate variables in project files, you can
+specify different boilerplate text&nbsp; for each project. </p>
+
+<h4>Customization Variables</h4>
+
+<p>The following JDE customization variables control creation of
+autocoded Java source buffers: <br>
+&nbsp; </p>
+
+<table border="1" width="100%">
+    <tr>
+        <th>Variable</th>
+        <th>Group</th>
+        <th>Usage</th>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-gen-class-buffer-template</tt></td>
+        <td valign="top">Autocode</td>
+        <td>Template for a generic public class buffer.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-gen-console-buffer-template</tt></td>
+        <td valign="top">Autocode</td>
+        <td>Template for a console application buffer.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-gen-jfc-app-buffer-template</tt></td>
+        <td valign="top">Autocode</td>
+        <td>Template for a JFC (Swing) application.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-gen-buffer-templates</tt></td>
+        <td valign="top">Autocode</td>
+        <td valign="top">Specifies templates available to create
+        Java buffers.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-gen-buffer-boilerplate</tt></td>
+        <td valign="top">Autocode</td>
+        <td valign="top">Specifies lines of text to be inserted
+        at the head of class files.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-gen-boilerplate-function</tt></td>
+        <td valign="top">Autocode</td>
+        <td>Specifies a function that returns a string of
+        boilerplate text. The default value is <tt>jde-gen-create-buffer-boilerplate</tt>,
+        which returns the value of <tt>jde-gen-buffer-boilerplate</tt>.</td>
+    </tr>
+</table>
+
+<p>&nbsp; <br>
+See&nbsp; <a href="#CustomizingAutocode">Customizing Autocode
+Templates</a> for information on how to customize the class
+autocode templates. </p>
+
+<a name="PointTemplates">
+<h3>Point Templates</h3>
+</a>
+
+<p>The following commands insert templates at the current point
+in the buffer: </p>
+
+<ul>
+    <li><font size="2"><b>JDE-&gt;Generate-&gt;Get/Set Pair</b></font>
+        generates an instance variable and a get and set method
+        for that variable</li>
+    <li><font size="2"><b>JDE-&gt;Generate-&gt;Println</b></font>
+        generates a System.out.println(...); statement.</li>
+    <li><font size="2"><b>JDE-&gt;Generate-&gt;Listener-&gt;Action</b></font>
+        generates and registers an action listener for a
+        specified component.</li>
+    <li><font size="2"><b>JDE-&gt;Generate-&gt;Listener-&gt;Window</b></font>
+        generates and registers a window listener for a specified
+        window.</li>
+    <li><font size="2"><b>JDE-&gt;Generate-&gt;Listener-&gt;Mouse</b></font>
+        generates and registers a mouse listener for a specified
+        component.</li>
+    <li><font size="2"><b>JDE-&gt;Generate-&gt;Other</b></font>
+        allows you to select any of the above templates or a
+        custom (user-defined) template.</li>
+</ul>
+
+<p>&nbsp;The following variables control generation of code at
+point: <br>
+&nbsp; </p>
+
+<table border="1" width="100%">
+    <tr>
+        <th>Variable</th>
+        <th>Group</th>
+        <th>Usage</th>
+    </tr>
+    <tr>
+        <td><tt>jde-gen-get-set-var-template</tt></td>
+        <td>Autocode</td>
+        <td>Defines a get/set method pair template.</td>
+    </tr>
+    <tr>
+        <td><tt>jde-gen-listener-action-template</tt></td>
+        <td>Autocode</td>
+        <td>Defines an action listener template.</td>
+    </tr>
+    <tr>
+        <td><tt>jde-gen-listener-window-template</tt></td>
+        <td>Autocode</td>
+        <td>Defines a window listener template.</td>
+    </tr>
+    <tr>
+        <td><tt>jde-gen-listener-mouse-template</tt></td>
+        <td>Autocode</td>
+        <td>Defines a mouse listener template.</td>
+    </tr>
+    <tr>
+        <td valign="top"><tt>jde-gen-inner-class-template</tt></td>
+        <td valign="top">Autocode</td>
+        <td>Defines a template for creating a class inside
+        another class or inside an existing source buffer.</td>
+    </tr>
+    <tr>
+        <td><tt>jde-gen-code-templates</tt></td>
+        <td>Autocode</td>
+        <td>Specifies available code templates.</td>
+    </tr>
+</table>
+
+<p>See</p>
+
+<ul>
+    <li>&nbsp;<a href="#CustomizingStandardTemplates">Customizing
+        Standard Templates</a> for information on how to customize&nbsp;
+        templates provided by the JDE.</li>
+    <li>&nbsp;<a href="#CreatingCustomTemplates">Creating Custom
+        Templates</a> for information on how to create templates
+        from scratch.</li>
+</ul>
+
+<a name="CustomizingTemplates">
+<h3>Customizing Templates</h3>
+</a>
+
+<p>You can customize the JDE's standard code templates, using the Emacs
+customization feature. </p>
+
+<p>To customize an autocode template: </p>
+
+<ol>
+    <li>Select <font size="2"><strong>JDE-&gt;Options-&gt;Autocode</strong></font>
+        <p>The JDE displays a customization buffer containing the
+        autocode templates. </p>
+    </li>
+    <li>Edit the template to suit your needs. <p>The JDE uses the
+        template format defined by <tt>tempo.el</tt> to represent
+        class templates. Each template consists of a list of
+        strings, symbols, and functions, each of which represents
+        content to be inserted successively into the buffer at
+        the current point. The strings represent fixed content.
+        The symbols and functions represent variable content. See
+        the docstring for the function <tt>tempo-define-template</tt>
+        for more information, including the meaning of special
+        symbols such as <tt>'n&gt;</tt>. </p>
+    </li>
+    <li>Select the state button associated with the template. <p>A
+        menu pops up with a list of options for saving your
+        changes. </p>
+    </li>
+    <li>Save your changes. <p>Select <font size="2"><b>Save for
+        Future Sessions</b></font> if you want your changes to
+        apply to all projects. If you want your changes to apply
+        only to the current projects, select <font size="2"><b>Set
+        for Current Session</b></font>. Then select <font
+        size="2"><b>JDE-&gt;Options-&gt;Save Project</b></font>
+        to save your changes in the current project's project
+        file. </p>
+    </li>
+</ol>
+
+<a name="CreatingTemplates">
+<h3>Creating Templates</h3>
+</a>
+
+<p>The JDE considers any command (interactive function) that
+inserts code into a buffer at point to be a template. The JDE
+uses the&nbsp; Emacs tempo library to create built-in templates.
+You can use tempo to create your own, add-on templates (see below
+and the doc for the&nbsp;&nbsp; <tt>tempo-define-template </tt>for
+more information) or&nbsp; create templates&nbsp; from scratch.
+In either case, once you have created a template, you can add it
+to the JDE's lists of available code and/or buffer templates,&nbsp;
+using the JDE's jde-gen-code-templates and/or jde-gen-buffer-templates
+variables, respectively. Adding a template to these lists enables
+you to invoke the templates from the JDE menus. When adding a
+template, you need to specify a unique title for the template.
+These titles enable you to specify the templates when invoking
+them, using the JDE's custom code template commands (<font
+size="2"><b>Files-&gt;JDE New-&gt;Custom</b></font> and <font
+size="2"><b>JDE-&gt;Generate-&gt;Custom</b></font>). You can use
+auto completion to enter a template title when invoking a custom
+code generation command. Note that you can specify different sets
+of templates for different projects, by setting and saving the
+template list variables in project files. See the following
+sections for more information: </p>
+
+<ul>
+    <li>&nbsp;<a href="#DefiningTemplate">Defining a Template and
+        Template Insertion Function</a></li>
+    <li>&nbsp;<a href="#RegisterTemplate">Registering Custom
+        Templates</a></li>
+    <li>&nbsp;<a href="#AssignKeyToTemplate">Assigning Keys To
+        Templates</a></li>
+</ul>
+
+<a name="DefiningTemplate">
+<h4>Defining a Template and Template Insertion Function</h4>
+</a>
+
+<p>The tempo-define-template&nbsp; macro enables you to define a
+template and a function that inserts that template at the current
+point in the current buffer. You specify the template as a list
+oftemplate elements where each element is text, a special symbol,
+or a Lisp expression. The function inserts each text element
+exactly as specified in the buffer; it replaces special symbols
+with some text (e.g., user input), and it replaces Lisp
+expressions with the text that results from evaluating them. </p>
+
+<p>For example, the following Lisp code </p>
+
+<pre>
+    (tempo-define-template
+      &quot;foo&quot;                              ;; template name
+       '(&quot;System.out.println(\&quot;foo\&quot;);&quot;) ;;template definition
+       &quot;f&quot;                               ;; abbreviation
+    &quot;Inserts a print foo message&quot;)       ;; template documentation
+</pre>
+
+<p>defines a template for Java code that always prints &quot;foo&quot;
+to standard out: </p>
+
+<pre>
+    System.out.println(&quot;foo&quot;);
+</pre>
+
+<p>Notice that the template definition uses the Lisp string
+escape character to specify the string &quot;foo&quot;.&nbsp;
+This is necessary when you want to include quoted strings in a
+template definition.) </p>
+
+<p>The sample Lisp form also defines an interactive template
+function <tt>tempo-template-foo</tt>. Now suppose you insert the
+sample code in your <tt>.emacs</tt> file. After Emacs starts up,
+whenever you enter the command <tt>M-x tempo-template-foo,</tt>
+Emacs inserts </p>
+
+<pre>
+     System.out.println(&quot;foo&quot;);
+</pre>
+
+<p>at the current point in your Java source buffer (or any buffer,
+tempo doesn't care). </p>
+
+<p>The preceding example is admittedly not vary useful because it
+always prints the same text. You can create more useful templates,
+using special tempo template symbols and lisp forms. This
+approach, for example, allows you to create a template that can
+print any user-defined text to standard out: </p>
+
+<pre>
+     (tempo-define-template
+       &quot;debug&quot;                          ;; template name
+       '(&quot;if (debug)&quot; n&gt;                ;; insert new line plus indent
+       &quot;System.out.println(&quot;
+       (p &quot;Enter debug message:&quot;)       ;; Prompts for debug message
+       &quot;);&quot;)
+       &quot;d&quot;                              ;; abbreviation 
+
+       &quot;Inserts a print debug message&quot;) ;; template documentation 
+</pre>
+
+<p>The template function produced by this example prompts you to
+enter the text to be printed when inserting the function into a
+buffer. In particular, it inserts </p>
+
+<pre>
+     if (debug)
+       System.out.println(DEBUG-MESSAGE);
+</pre>
+
+<p>where <tt>DEBUG-MESSAGE</tt> is any text that you enter. For
+example, suppose you enter </p>
+
+<pre>
+     &quot;Selected color = &quot; + color
+</pre>
+
+<p>at the prompt. The template function inserts </p>
+
+<pre>
+     if (debug)
+       System.out.println(&quot;Selected color = &quot; + color);
+</pre>
+
+<p>at the current point in the buffer. </p>
+
+<p>See the documentation for <tt>tempo-define-template</tt> (type
+<tt>c-h f tempo-define-template</tt>) for more information on
+creating templates. </p>
+
+<a name="RegisterTemplate">
+<h4>Registering Custom Templates</h4>
+</a>
+
+
+<p>You can register templates that you create with the JDE. When
+you register a template with the JDE, it appears among the list
+of templates that you can select when you select <font size="2"><b>JDE-&gt;Generate-&gt;Other...</b></font>.
+You register a template by customizing the JDE variable <tt>jde-gen-code-templates</tt>.
+The value of this variable is a list of the template functions
+that the JDE command <font size="2"><b>JDE-&gt;Generate-&gt;Other...</b></font>
+can invoke. To register a custom template, add its name to the
+list. For example, the following screen shows the customization
+buffer for <br>
+<tt>jde-gen-code-templates</tt> after it has been customized to
+include the template defined in the previous example. </p>
+
+<p><img src="images/RegisterTemplate.gif" width="712"
+height="496"> </p>
+
+<p>To insert a template that you have registered </p>
+
+<ol>
+    <li>Select <font size="2"><b>JDE-&gt;Generate-&gt;Other...</b></font>
+        <p>The JDE displays the prompt</p>
+        <p><tt>&nbsp;&nbsp;Enter template:</tt></p>
+        <p>in the minibuffer. </p>
+    </li>
+    <li>Enter the template's name and press <font size="2"><b>RETURN</b></font>
+        <p>or,</p>
+        <p>press the <font size="2"><b>TAB</b></font> key to
+        display a list of templates in a completion buffer: </p>
+        <p><img src="images/TemplateList.gif" width="720"
+        height="552"> </p>
+        <p>Select the template you want by double-clicking its
+        name.</p>
+    </li>
+</ol>
+
+<a name="AssignKeyToTemplate">
+<h4>Assigning Keys to Templates</h4>
+</a>
+
+<p>You can assign templates to keyboard keys to speed use of
+frequently used templates. For example, insert this form </p>
+
+<pre>
+     (global-set-key [f9] 'jde-gen-to-string-method)
+</pre>
+
+<p>in your <tt>.emacs</tt> file to assign the F9 function key to
+the JDE template that generates a skeleton <tt>toString</tt>
+method. </p>
+
+<a name="ControlFlow">
+<h3>Control Flow</h3>
+</a>
+
+<p>The JDE provides templates for completing the following control 
+flow statements:</p>
+
+<table width=100%>
+  <colgroup>
+   <col width=40% align=left valign=top></col>
+   <col width=60% align=left valign=top></col>
+  </colgroup>
+  <thead>
+    <tr>
+      <th>Statement</th>
+      <th>Abbreviation</th>
+    <tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td><code>if-then</code></td>
+      <td><code>if</code></td>
+    </tr>
+    <tr>
+      <td><code>else</code></td>
+      <td><code>else</code></td>
+    </tr>
+    <tr>
+      <td><code>if-then-else</code></td>
+      <td><code>ife</code></td>
+    </tr>
+    <tr>
+      <td><code>while</code></td>
+      <td><code>while</code></td>
+    </tr>
+    <tr>
+      <td><code>for</code></td>
+      <td><code>for</code></td>
+    </tr>
+    <tr>
+      <td><code>for (int I=0;I&lt;UL;I++)</code></td>
+      <td><code>for</code></td>
+    </tr>
+    <tr>
+      <td><code>main method</code></td>
+      <td><code>main</code></td>
+    </tr>
+    <tr>
+      <td><code>switch</code></td>
+      <td><code>switch</code></td>
+    </tr>
+    <tr>
+      <td><code>case</code></td>
+      <td><code>case</code></td>
+    </tr>
+   </tbody>
+</table>                 
+
+<p><strong>Note</strong> You must enable the JDE's abbreviation mode to use the
+control flow templates. See <a href="#Abbreviations">Abbreviations</a> for more information.</p>
+  
+<p>To use a template, enter the abbreviation for the template followed by a space. Some
+templates optionally prompt you for items to insert into the template. To enable 
+prompting, set the variable <code>tempo-interactive</code> to a 
+<code>non-nil</code> value in your <code>.emacs</code> file.</p>
+
+<p>You can customize the templates to suit your indentation style. To 
+customize the templates, select <strong>Project-&gt;Options-&gt;Autocode</strong> from the
+JDE menu.
+
+<p><strong>Note</strong> Thanks to Eric D. Friedman <friedman@lmi.net>
+for contributing the control flow templates.</p>
+
+<a name="CompilingJavaPrograms">
+<h2>Compiling Java Programs</h2>
+</a>
+
+<p>The <tt>jde-compile</tt> command (<font size="2"><b>JDE-&gt;Compile</b></font><b>,
+</b><tt>C-c C-v C-c</tt>) compiles the Java source file in the
+current buffer, using <tt>javac</tt>, the Java compiler provided
+by the JDK, or another compiler that you specify (see <a
+href="#SpecifyingCompiler">Specifying a Compiler</a>). The
+compile command displays the output of the compiler in a separate
+compilation buffer. If a compilation buffer does not exist, the
+compile command creates the buffer; otherwise, it reuses the
+existing compile output buffer. The compilation buffer operates
+in <tt>compilation-mode</tt>, a standard Emacs buffer mode. This
+mode greatly simplify locating compilation errors in the Java
+source code. For example, to find the line that cause a
+compilation error, simply click the error message in the
+compilation buffer. </p>
+
+<p>The JDE uses the Emacs command <code>start-process-shell-command</code>
+to launch a Java compile process. This command in turn uses the equivalent of</p>
+
+<p><code>SHELL COMMAND_SWITCH javac OPTIONS BUFFER_NAME.java</code>
+
+<p>
+to launch the compile process where <code>SHELL</code> is the command shell
+specified by the Emacs variable <code>shell-file-name</code>  and 
+<code>COMMAND_SWITCH</code> is the value of the Emacs
+variable <code>shell-command-switch</code>. You must set these variables to be
+compatible in your <code>.emacs</code> file. For example, if you set <code>shell-file-name</code> to
+<code>bash</code>, you must set <code>shell-command-switch</code> to <code>-c</code>, the command 
+switch used by <code>bash</code>.
+</p>
+
+<p><strong>Note</strong> Compile processes are the only processes launched by JDE, using a
+command shell. The JDE uses the Emacs command <code>start-process</code> to launch all
+other processes, e.g., java, jdb, and JDEbug processes. The <code>start-process</code>
+launches processes as subprocesses of Emacs, without doing any wild-card expansion or
+environment variable substitution of command-line arguments.
+</p>
+
+
+<a name="CompilationOptions">
+<h3>Compilation Options</h3>
+</a>
+
+<p>The JDE allows you to specify compilation options by setting
+compilation variables.You must use the Emacs customization
+feature or, if available, JDE functions to set compilation
+variables. To use the customization feature, select <font
+size="2"><b>Options-&gt;Compile</b></font> from the <font
+size="2"><b>JDE</b></font> menu. (See <a href="#ConfiguringJDE">Configuring
+the JDE</a> for more information on using the customization
+feature).&nbsp; To save the compilation settings in the project
+file (see <a href="#UsingProjectFiles">Using Project Files</a>)
+for the current source buffer, select <font size="2"><b>Options-&gt;Update
+Project</b></font> from the <font size="2"><b>JDE</b></font> menu.
+</p>
+
+<h4>Setting Compile Options Interactively</h4>
+
+<p>If you set the customization variable <tt>jde-read-compile-args</tt>
+to a non-<tt>nil</tt> value, the JDE compile command prompts you
+to enter compilation options in the minibuffer. It appends the
+options that you enter to the options specified via customization
+variables. The JDE saves the arguments that you enter in a
+minibuffer history list. You can recall previously entered
+options by pressing the up or down arrows on your keyboard. </p>
+
+<p><b>Note:</b> The JDE uses the values of the JDE customization
+variables to set the compiler's command-line option switches. The
+JDE assumes that the compiler you are using (specified by the
+customization variable <tt>jde-compiler</tt>) has the same set of
+command-line switches as the latest version of <tt>javac,</tt>
+the compiler supplied with JavaSoft's JDK. If the&nbsp; command-line
+switch&nbsp; for a particular option supported by the compiler
+your are using is not the same as that specified by the latest
+version of <tt>javac</tt>,&nbsp; you must use the variable <tt>jde-compile-option-command-line-args</tt>
+to select the option.&nbsp; </p>
+
+<h4>Customization Variables</h4>
+
+<p>The following table lists the JDE compilation variables and
+the functions used to set them. <br>
+&nbsp; </p>
+
+<table border="2" cellpadding="5">
+  <colgroup>
+    <col width=35% align=left valign=top></col>
+    <col width=10% align=left valign=top></col>
+    <col width=55% align=left valign=top></col>
+ </colgroup>
+ <thead>
+    <tr>
+        <th bgcolor="#FFCCCC"><font color="#CC0000"><b>Name</b></font>
+        </th>
+        <th bgcolor="#FFCCCC"><font color="#CC0000"><b>Group</b></font>
+        </th>
+        <th bgcolor="#FFCCCC"><font color="#CC0000"><b>Usage</b></font><font
+        color="#FFFF00"></font> </th>
+    </tr>
+ </thead>
+ <tbody>
+    <tr>
+        <td valign="top" bgcolor="#CCFFFF"><code>jde-compiler</code></td>
+        <td valign="top" bgcolor="#CCFFFF">Project&nbsp;</td>
+        <td valign="top" bgcolor="#CCFFFF">Specifies the compiler
+        (javac, by default)&nbsp; to use to compile the code in
+        the current source buffer. The command <code>jde-set-compiler</code>
+        sets the buffer-local value of this option.&nbsp;</td>
+    </tr>
+    <tr>
+        <td valign="top" bgcolor="#FFFFCC"><code>jde-compile-option-command-line-</code>&nbsp;
+        <br>