# ApplicationLauncher.Callback

Import: `import com.install4j.api.launcher.ApplicationLauncher;`

```java
static interface Callback
```

You can implement this interface to receive notifications when the installer application exits or needs to
shut down your application.


**See also:**

- [ApplicationLauncher.launchApplication](ApplicationLauncher.md#launchapplication-string-string-boolean-callback)

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`exited(int)`](#exited-int) | `void` | Invoked when the installer application has exited. |
| [`prepareShutdown()`](#prepareshutdown) | `void` | Invoked before the installer application shuts down this JVM. |
| [`createProgressListener()`](#createprogresslistener) | `ProgressListener` | Override this method and return an instance of [`ProgressListener`](ApplicationLauncher.ProgressListener.md) to receive progress information from the installer application. |

### exited(int)

```java
void exited(int exitValue)
```

Invoked when the installer application has exited.


**Parameters:**

- `exitValue` — the exit value of the installer application

### prepareShutdown()

```java
void prepareShutdown()
```

Invoked before the installer application shuts down this JVM.
This happens when a "Shutdown calling launcher" action is executed in the
installer application.

### createProgressListener()

```java
default ProgressListener createProgressListener()
```

Override this method and return an instance of [`ProgressListener`](ApplicationLauncher.ProgressListener.md) to receive progress
information from the installer application. This is implemented on Windows, macOS and Linux.
On other Unix variants it is unsupported and can be switched on by setting the system property
`install4j.forceProgressListener=true`.

