WinAssociations (install4j API)
Keywords: com.install4j.api.windows.WinAssociations class

Overview | Package | Class | Tree | Deprecated | Index | Help
| install4j API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.install4j.api.windows
Class WinAssociations

    java.lang.Object
      com.install4j.api.windows.WinAssociations

    public class WinAssociations

extends java.lang.Object

Collection of static methods to create and remove file associations on Microsoft Windows.

Author:
  ej-technologies GmbH

Method Summary
`static void` | `create(java.lang.String extension, java.lang.String description, java.io.File iconFile, java.io.File executable)` Creates a file assocation.
`static boolean` | `exists(java.lang.String extension)` Checks whether a file association already exists.
`static java.lang.String` | `getExecutable(java.lang.String extension)` Retrieves the executable associated with an extension.
`static void` | `remove(java.lang.String extension)` Removes a file association.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### create

    public static void create(java.lang.String extension,
                              java.lang.String description,
                              java.io.File iconFile,
                              java.io.File executable)

  Creates a file assocation.

  Parameters:
    `extension` - the extension including the leading dot (e.g. ".doc").
    `description` - a description of the file type.
    `iconFile` - the icon file for the document. May be null.
    `executable` - the executable that shall be called with the file as parameter.

### exists

    public static boolean exists(java.lang.String extension)

  Checks whether a file association already exists.

  Parameters:
    `extension` - the extension including the leading dot (e.g. ".doc").
  Returns:
    true if an association exists

### getExecutable

    public static java.lang.String getExecutable(java.lang.String extension)

  Retrieves the executable associated with an extension.

  Parameters:
    `extension` - the extension including the leading dot (e.g. ".doc").
  Returns:
    the executable associated with the given extension. Null if there is no association.

### remove

    public static void remove(java.lang.String extension)

  Removes a file association.

  Parameters:
    `extension` - the extension including the leading dot (e.g. ".doc").

Overview | Package | Class | Tree | Deprecated | Index | Help
| install4j API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD