O'Reilly logo

Java® and Mac OS® X by T. Gene Davis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Creating Terminal Applications

Advanced programmers take the Terminal seriously. Working from the command line is not suited to every programmer's taste. I know several excellent programmers who avoid the command line whenever they can. However, dismissing the Terminal environment entirely removes an important tool from your repertoire.

Games, editors, utilities, and just about every type of application imaginable are available for the Terminal. Many programmers and system administrators refuse to code outside of the command-line editor's emacs and vi. For quick edits from the Terminal, nano, shown in Figure 11.1, makes a great tool. The point is that Terminal applications' use and development are popular on OS X and in the Unix world.

If you spend much time working in the Terminal, you quickly find Terminal applications performing tricks you never dreamed of trying with System.out.println(). Advanced Terminal applications regularly hide passwords as they are entered, change the foreground and background colors of text, manipulate the positions of cursors, and clear the Terminal of unwanted text. Truly impressive Terminal applications even provide menu systems and pop-up dialog boxes within the Terminal window.

Usually, introductory Java books and classes skip past complex Terminal application programming, sticking mostly with basic System.out.println() calls. When using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required