You can of course create programs using any editor, or even a word processor, as
long as you can save the file in text format with the extension you want. Notepad,
for example, uses text but insists on using the
txt extension (but
you can override by double-quoting the name). MS-Word allows any extension but
you must override the default
Ideally, however, the editor knows that you are writing programs, not
sentences and paragraphs, and thus offers services like:
This is over and above the standard services you expect, like opening multiple
files, spell checking, editing text, and so on.
- Highlight keywords, operators, literals, and other language-specific features.
- Balance braces and parentheses.
- Block indent and un-indent.
- Support user-defined tab stops.
- Display line numbers.
One freeware editor that meets the above requirements is Crimson
Windows and nedit on Linux (
are the details::
Note that this editor recognizes several languages including
Java, C, HTML/XML, CSS, Shell Scripts, and MIPS assembly.
- Download this file (1,253,038 bytes) and store
in on your desktop. You can delete it once the installation is completed.
- Execute the file by double-clicking it.
- Select to install the editor itself plus the Start Menu and desktop shortcuts.
- Accept the default installation directory by clicking Install
If you don't already have an editor that you are comfortable with, download nedit
from this site and configure it as follows:
Note: whenever you write a program from scratch (as opposed to editing an existing one), select Language Mode from the Preferences
menu and click Java.
- Select Default Settings from the Preferences menu and in it, select Tabs.
- In the popped window, enter 3 for the Tab spacing (hardware tab characters) and also 3 for the Emulated tab spacing.
- Make sure that Use tab characters in padding is disabled.
- Click OK.
- Select Default Settings again from the Preferences menu and in it, select Syntax Highlighting.
A third-level menu will appear and in it, click on On.
- Select Default Settings again from the Delimiter menu and in it, make sure that the item Show Matching (..) is selected.
- Select Preferences one last time and in it, select Save Defaults.
- When the dialog box appears, click OK.