Overview (install4j API)
Description: package index

# install4j API documentation

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

# Getting started

Please read "API->installer API" in the documentation for an overview on how to use the API. Packaging your own beans as regular install4j extensions is explained under "API->Extensions". The documentation is found under `doc` in the installation directory and can be displayed with the `F1` keyboard shortcut in the install4j IDE.

To get started with writing your own screens, actions and form components, please have a look at the "Custom code" example project that is located under `samples/customCode` in the installation directory.

# Classpath for framework classes

When developing your own classes, you have to add the install4j API to your compile classpath. Do not distribute this jar file with your application, install4j will handle this for you. `i4jruntime.jar` will be automatically available on the classpath in the installer as well as for all launchers generated by install4j. The install4j runtime is available as a Maven dependency:

Maven

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

Gradle

            dependencies {
                classpath group: 'com.install4j', name: 'install4j-runtime', version: '12.0.5'
            }

If a Maven dependency is not an option, you can add the JAR files that are located under `resource/i4jruntime.jar` and `resource/i4jruntime-dev-additional.jar` in the installation directory. The Maven dependency combines both of these JAR files.

Some API calls, such as `com.install4j.api.launcher.Variables.getCompilerVariable(...)`, require the config file of an installation. If you set the system property `install4j.runtimeDir` to the `.install4j` directory of an installation of your project, the config file will be loaded from that directory.

# Extension points

install4j provides four extension points: screens, actions, form components and styles. Please see the corresponding package overview for more information:

- com.install4j.api.screens package
- com.install4j.api.actions package
- com.install4j.api.formcomponents package
- com.install4j.api.styles package

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.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.