association : Java Glossary

association
In SQL (Standard Query Language), a many to many relationship between tables. In windows, a hare-brained scheme to associate file name extensions with the applications that process them. It is hard to use, buggy and irregular beyond belief.

To set them up in Windows, click Start ⇒ Settings ⇒ Control Panel ⇒ Folder Options ⇒ File Types. See the more detailed instructions on setting up the *.jnlp association. In Windows W2K/XP/W2003/Vista/W7-32/W7-64 you can now sort the list by extension or filetype by clicking on the heading. You commonly set up edit for example to use your editor in preference to wordpad for a given extension, e.g.

E:\vslick\win\vs.exe "%1"
The quote marks help deal with filenames containing spaces. The %1 is where the filename to edit will be inserted.

There are also another set of associations in your browser between extensions, MIME (Multipurpose Internet Mail) types and programs to deal with those documents.

In Vista, there is a simple editor for associating extensions with programs. it does not handle MIME types. Click Start ⇒ Default Programs (on right) ⇒ associate a file or protocol with a program.

  1. Start
  2. Default Programs (on right)
  3. Associate a file type or protocol with a program
Unlike earlier incarnations of Windows, Vista does not let you set up different associations for open, edit and print. You can just set up the open association. You might try out the Creative Element Power Tools to handle configuring all the associations and the icon.

java.exe vs javaw.exe

One of the most useful associations to set up is to make *.jar files executable with java.exe. Then you can just type the name of the jar on the command line to start it executing. If you use javaw.exe rather than java.exe you won’t see the console output. Watch out, Java installers often associate *.jar files with javaw.exe instead of java.exe, overriding your setting.

Vista no longer lets you configure the all the associations, e.g. open, edit and print. There is a way around that, using Creative Element Power Tools, other than manually modifying the registry.

In Windows 7, there is a quick way to set up associations. You just type a filename complete with extension. Windows will complain it does not know what program is supposed to process the file. You then select the associated program from a list or browse for it. From then on Windows remembers the association.


CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/association.html J:\mindprod\jgloss\association.html
logofeedback Please email your feedback for publication, letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email If you want your message kept confidential, not considered for posting, please explicitly specify that.
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.179.210]
You are visitor number 11.