Overview (install4j API)
Description: package index

# install4j API documentation

# Module install4j-api

This documentation specifies the public API that install4j provides for scripting installers and uninstallers, developing extensions, and accessing runtime services.

## Getting started

Read the API → installer API chapter in the install4j documentation for an overview of how to use the API. Packaging custom beans as install4j extensions is covered under API → Extensions. The documentation ships under `doc` in the install4j installation directory and can be displayed with F1 in the install4j IDE.

To get started writing custom screens, actions, and form components, the Custom code example project under `samples/customCode` in the install4j installation directory is the canonical starting point.

## Classpath for framework classes

Add the install4j runtime to your compile classpath only — do not distribute it with your application. install4j wires `i4jruntime.jar` onto the classpath automatically for installers and for every generated launcher. The runtime is published to Maven Central:

Maven

    <dependency>
        <groupId>com.install4j</groupId>
        <artifactId>install4j-runtime</artifactId>
        <version>13.0.2</version>
    </dependency>

Gradle

    dependencies {
        compileOnly("com.install4j:install4j-runtime:13.0.2")
    }

If a Maven dependency isn't an option, the JAR ships under `resource/i4jruntime.jar` of the install4j installation.

Some calls, for example `com.install4j.api.launcher.Variables.getCompilerVariable(...)`, need the config file of an installation. Set the system property `install4j.runtimeDir` to the `.install4j` directory of an installed copy of your project to make the config file resolvable.

## Extension points

install4j defines four extension points for custom code. Browse the per-package overviews:

- `com.install4j.api.screens` — installer screens
- `com.install4j.api.actions` — installer actions
- `com.install4j.api.formcomponents` — form components
- `com.install4j.api.styles` — screen styles

## Test API

The packages under `com.install4j.api.test` are the install4j Test API. This is a separate Maven artifact (`com.install4j:install4j-test`) for writing automated UI tests that drive an actual installer UI from inside a test JVM. Start with `com.install4j.api.test` for the overview, then drill into:

- `com.install4j.api.test.session` — session builders and the `Session` interface family
- `com.install4j.api.test.ui` — screen and dialog handles
- `com.install4j.api.test.formcomponents` — typed handles for every install4j form component

Packages
Package
Description
com.install4j.api
This package contains general utility classes for the install4j API.
com.install4j.api.actions
This package contains the interfaces and abstract base classes for actions.
com.install4j.api.beaninfo
This package contains the utility classes for writing BeanInfo classes for screens, actions, and form components.
com.install4j.api.beans
This package contains the base classes for all extension points in install4j as well as special property classes.
com.install4j.api.context
This package contains classes that allow you to interact with the installer and its environment.
com.install4j.api.events
This package contains classes that allow you to listen for events generated by the installer.
com.install4j.api.formcomponents
This package contains the interface and abstract base class for form components.
com.install4j.api.laf
This package contains interfaces that are concerned with the look and feel of installer applications.
com.install4j.api.launcher
This package contains classes that your own application code can use to access runtime services provided by install4j.
com.install4j.api.macos
This package contains classes with static utility methods for using macOS-specific features that are not directly supported by the Java platform.
com.install4j.api.screens
This package contains the interfaces and abstract base classes for screens.
com.install4j.api.styles
This package contains the interface and abstract base class for styles.
com.install4j.api.test
The install4j Test API.
com.install4j.api.test.exceptions
Typed unchecked exceptions thrown by the test API for specific failure categories.
com.install4j.api.test.formcomponents
Typed handles for every form component.
com.install4j.api.test.session
Session builders and the `Session` interface family.
com.install4j.api.test.ui
Handles for wizard screens and modal dialogs.
com.install4j.api.unix
This package contains classes with static utility methods for using Unix-specific features that are not directly supported by the Java platform.
com.install4j.api.update
This package contains classes that help you to handle auto-updates.
com.install4j.api.windows
This package contains classes with static utility methods for using Windows-specific features that are not directly supported by the Java platform.
com.install4j.api.windows.service
This package contains classes to manipulate Windows services.