Creating a File Association in Windows

After a text editor has been selected, Windows users should associate that editor with the .java file extension. This makes it possible to open a .java source file by double- clicking its name in a folder. It also prevents editors, such as Windows Notepad, from incorrectly adding the .txt file extension to .java source files.

To create a file association, you first must have a file to work on. Open a folder in Windows and create a new text document by selecting File, New, Text Document from the folder's menu bar (see Figure B.2).

Figure B.2. Creating a new text document in a Windows folder.

A new text document ...

Get Sams Teach Yourself Java 2 in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.