UMass Lowell Computer Science
The NetBeans home page on the Web is located at: http://www.netbeans.org
To switch to the multiple document interface, which is just like JPadPro and Visual C++ and the like and much more convenient to use (IMHO):
-> Setup Wizard...To reset the tab size (the default is 8 which is far too large; I suggest 2):
To make all editors insert spaces instead of tabs (this is a global setting):
-> Options...-> Indentation Engines-> Java
Indentation EngineTo set parameters for generated Javadoc
-> Options...-> Doclets and
click Standard DocletTo generate the Javadoc for a program
-> Generate Javadoc
Note that NetBeans does not allow you to set three very important options for the Javadoc tool: -version, -breakiterator, and -classpath. I therefore recommend that you do not generate your Javadoc from inside NetBeans. Instead, use the command:
javadoc -private -author -version -breakiterator -d doc [-classpathpath to add]list of Java files to processIf you dont need the -classpath option, the following DOS batch file makes the process a bit more convenient:
@echo off : File jd.bat -- passes Java files to javadoc : Jesse M. Heines, UMass Lowell Computer Science, heines@cs.uml.edu : Copyright (c) 2004 by Jesse M. Heines. All rights reserved. May be freely : copied or excerpted for educational purposes with credit to the author. : updated by JMH on September 04, 2004 at 04:44 PM
if not [%1]==[] goto ParameterSupplied
echo ERROR: A Java program name must be supplied, with the .java extension.
goto exit
:ParameterSupplied
: make a doc directory if necessary
if not exist doc mkdir doc
: check for existence of specified files
set filename=%1
if not [%filename%]==[] if not exist %filename% goto error
set filename=%2
if not [%filename%]==[] if not exist %filename% goto error
set filename=%3
if not [%filename%]==[] if not exist %filename% goto error
set filename=%4
if not [%filename%]==[] if not exist %filename% goto error
set filename=%5
if not [%filename%]==[] if not exist %filename% goto error
set filename=%6
if not [%filename%]==[] if not exist %filename% goto error
set filename=%7
if not [%filename%]==[] if not exist %filename% goto error
set filename=%8
if not [%filename%]==[] if not exist %filename% goto error
set filename=%9
if not [%filename%]==[] if not exist %filename% goto error
: all files exist, call javadoc
@echo on
javadoc -private -author -version -breakiterator -d doc %1 %2 %3 %4 %5 %6 %7 %8 %9
@echo off
goto exit
:error
echo ERROR: File %filename% does not exist.
:exit
To modify the default Templates that format new programs
Note: Further information is available at http://developers.sun.com/prodtech/javatools/jsstandard/reference/tips/tip02-11-01.html
-> Options...Note: Modified templates are stored in directory
C:\Documents and Settings\username\.netbeans\3.6\system\Templates\Classes. These template files are only read when NetBeans is first started. Therefore, if you copy these files from one system to another while NetBeans is open, you must shutdown NetBeans and restart it for the changes to take effect.
To change the values (macro text strings) used in Templates
Note: These are the strings that can be inserted by preceding and following their names with double underscores such as __USER__)
-> Options...-> Java SourcesUSER=Jesse M. Heines, UMass Lowell Computer Science,\n
<a href="mailto:heines@cs.uml.edu">heines@cs.uml.edu</a>
For additional information on NetBeans macros and the built-in macro text strings
-> Help ContentsThe IDE has the following uneditable macros
Macro Generated String __DATE__Substitutes the date of template creation. __TIME__Substitutes the time of template creation. __NAME__Substitutes the name of the class (without extension). __PACKAGE__Substitutes the name of the package that the class is in. Do not use this macro for the package statement in a Java class. It is better to provide the package statement for the template itself. When a class is created from a template, the package statement is automatically changed to reflect the package that the class is created in. __PACKAGE_SLASHES__Substitutes the name of the class's package. However, the name is delimited with slashes (/) instead of periods (.). __PACKAGE_AND_NAME__Substitutes the name of the package and the file, substituted in the form packageName.fileName. If the file resides in the root of the filesystem, it is substituted only with the filename. __PACKAGE_AND_NAME_SLASHES__Works the same as PACKAGE_AND_NAME. However names are delimited with slashes (/) instead of periods (.). __QUOTES__Substitutes a double quote mark ("). This macro is necessary if you want to place a macro between quote marks. If you enclose a macro in actual quotes in the template, text substitution for that macro does not occur when you create an object from that template.
To make Shift-F1 and Alt-F1 and right-clicking a Java keyword bring up the
corresponding Javadoc page:
Note: Shift-F1 brings up the page in the IDE, Alt-F1 launches your default browser and displays the page there
-> Javadoc ManagerTo do a Save As...
Note: Unfortunately, there is no Save As... function in NetBeans. 8-( To accomplish this task, you need to go through a few steps.
-> Save)-> Copy from the pop-up window
and NetBeans adds a node to the tree with the name of your original file plus
_1To generate an HTML-formatted version of your code for displaying on a Web site
-> Print to HTML...