Java Reference
In-Depth Information
Discussion
It's less than an IDE (see the next recipe), but more than a command line. What is it? It's an
editor with Java support. Tools such as TextPad , Visual SlickEdit, and others are free or low-
cost windowed editors (many primarily for Microsoft Windows) that have some amount of
Java recognition built in, and the ability to compile from within the editor. TextPad recog-
nizes quite a number of file types, including batch files and shell scripts, C, C++, Java, JSP,
JavaScript, and many others. For each of these, it uses syntax highlighting to denote
keywords, comments, string literals, etc., usually by using one color for keywords, another
for class variables, another for locals, etc. This is very useful in spotting when part of your
code has been swallowed up by an unterminated /* comment or a missing quote.
Though this isn't the same as the deep understanding of Java that a full IDE might possess,
experience has shown that it definitely aids programmer productivity. TextPad also has a
“compile Java” command and a “run external program” command. Both of these have the
advantage of capturing the entire command output into a window, which may be easier to
scroll than a command-line window on some platforms. On the other hand, you don't see the
command results until the program terminates, which can be most uncomfortable if your
GUI application throws an exception before it puts up its main window. Despite this minor
drawback, TextPad is a very useful tool. Other editors that include color highlighting include
vim (an enhanced version of the Unix tool vi , available for Windows and Unix platforms
from http://www.vim.org ), the ever-popular Emacs editor, and more.
And speaking of Emacs , because it is so extensible, it's natural that people have built en-
hanced Java capabilities for it. One example is Java Development Environment for Emacs
(JDEE), an Emacs “major mode” ( jde-mode , based on c-mode ) with a set of menu items
such as Generate Getters/Setters. You could say that JDEE is in between using a Color-High-
lighting Editor and an IDE.
Even without JDEE, Emacs features dabbrev-expand , which does class and method name
completion. It is, however, based on what's in your current edit buffers, so it doesn't know
about classes in the standard API or in external JARs. For that level of functionality, you
have to turn to a full-blown IDE, such as those discussed in Compiling, Running, and Testing
with an IDE .
Search WWH ::




Custom Search