# Main Entry Point for the IPED Application: BootstrapUI and AppMain Architecture

> Discover the main entry point for the IPED application. Explore BootstrapUI and AppMain architecture and find the BootstrapUI.main() method for desktop UI initialization.

- Repository: [Serviço de Perícias em Informática/IPED](https://github.com/sepinf-inc/IPED)
- Tags: architecture
- Published: 2026-03-11

---

**The main entry point for the IPED application is the `BootstrapUI.main()` method located in [`iped-app/src/main/java/iped/app/bootstrap/BootstrapUI.java`](https://github.com/sepinf-inc/IPED/blob/main/iped-app/src/main/java/iped/app/bootstrap/BootstrapUI.java), which instantiates the bootstrap class and delegates execution to `AppMain` for the desktop UI initialization.**

IPED is an open-source digital forensic platform developed by sepinf-inc. Understanding the main entry point for the IPED application is essential for developers customizing the platform or troubleshooting startup sequences. The application uses a two-stage bootstrap process where `BootstrapUI` acts as the launcher and `AppMain` handles the actual UI initialization.

## BootstrapUI: The JAR Manifest Entry Point

The `BootstrapUI` class serves as the primary entry point referenced by the executable JAR's manifest. Located at [`iped-app/src/main/java/iped/app/bootstrap/BootstrapUI.java`](https://github.com/sepinf-inc/IPED/blob/main/iped-app/src/main/java/iped/app/bootstrap/BootstrapUI.java), this class extends the generic `Bootstrap` parent class to provide UI-specific startup behavior.

The `main` method at line 8 creates a new instance and immediately invokes the `run(args)` method:

```java
// iped-app/src/main/java/iped/app/bootstrap/BootstrapUI.java
public class BootstrapUI extends Bootstrap {
    public static void main(String args[]) {
        // Starts the bootstrap process which eventually runs AppMain
        new BootstrapUI().run(args);
    }

    @Override
    protected String getMainClassName() {
        // The class that really runs the UI
        return AppMain.class.getCanonicalName();
    }
}

```

The `getMainClassName()` override returns `AppMain.class.getCanonicalName()`, directing the parent `Bootstrap` class to load and execute the real application bootstrap rather than handling UI initialization directly.

## AppMain: Core UI Bootstrap Logic

While `BootstrapUI` handles the initial launch, the `AppMain` class at [`iped-app/src/main/java/iped/app/ui/AppMain.java`](https://github.com/sepinf-inc/IPED/blob/main/iped-app/src/main/java/iped/app/ui/AppMain.java) contains the substantive startup sequence for the graphical interface. The `main` method here initializes the control client, checks the Java version, detects case paths, and finally initializes the main application window.

```java
// iped-app/src/main/java/iped/app/ui/AppMain.java
public class AppMain {
    public static void main(String[] args) {
        // UI startup performed here
        startUpControlClient = new StartUpControlClient();
        startUpControlClient.start();
        UiScale.loadUserSetting();
        checkJavaVersion();
        new AppMain().detectCasePath();
        // …
        App.get().init(...);
    }
}

```

This separation allows `BootstrapUI` to perform classpath setup and system checks before handing control to `AppMain` for UI-specific tasks like scaling settings and window initialization.

## Alternative Entry Point for Processing Mode

IPED also supports headless batch processing through a separate entry point. The `Main` class at [`iped-app/src/main/java/iped/app/processing/Main.java`](https://github.com/sepinf-inc/IPED/blob/main/iped-app/src/main/java/iped/app/processing/Main.java) provides the entry point for non-UI processing mode, invoked by the parent `Bootstrap` class when running without a graphical interface.

## Command Line Execution

When launching the application from the command line, the JAR manifest points directly to `BootstrapUI`:

```bash
java -jar iped-search-app.jar

```

This execution path follows the sequence: JAR manifest → `BootstrapUI.main()` → `Bootstrap.run()` → `AppMain.main()` → UI display.

## Summary

- The main entry point for the IPED application is `BootstrapUI` in [`iped-app/src/main/java/iped/app/bootstrap/BootstrapUI.java`](https://github.com/sepinf-inc/IPED/blob/main/iped-app/src/main/java/iped/app/bootstrap/BootstrapUI.java).
- `BootstrapUI.main()` creates an instance and calls `run(args)`, which delegates to `AppMain` via the `getMainClassName()` override.
- `AppMain` at [`iped-app/src/main/java/iped/app/ui/AppMain.java`](https://github.com/sepinf-inc/IPED/blob/main/iped-app/src/main/java/iped/app/ui/AppMain.java) performs the actual UI initialization including version checks, UI scaling, and window setup.
- Headless processing uses [`Main.java`](https://github.com/sepinf-inc/IPED/blob/main/Main.java) at [`iped-app/src/main/java/iped/app/processing/Main.java`](https://github.com/sepinf-inc/IPED/blob/main/iped-app/src/main/java/iped/app/processing/Main.java) as an alternative entry point.
- The executable JAR manifest points directly to the `iped.app.bootstrap.BootstrapUI` class.

## Frequently Asked Questions

### What is the difference between BootstrapUI and AppMain in IPED?

`BootstrapUI` acts as a launcher that sets up the environment and classpath before delegating to `AppMain`. While `BootstrapUI` determines which main class to run via `getMainClassName()`, `AppMain` contains the actual logic for initializing the graphical interface, including UI scaling configuration, case path detection, and window creation.

### How does IPED handle headless or command-line processing?

For batch processing without a UI, IPED uses the `Main` class located at [`iped-app/src/main/java/iped/app/processing/Main.java`](https://github.com/sepinf-inc/IPED/blob/main/iped-app/src/main/java/iped/app/processing/Main.java). The parent `Bootstrap` class detects the execution context and routes to this alternative entry point instead of `AppMain` when running in headless mode.

### Where is the executable JAR manifest configured to point to BootstrapUI?

The manifest is configured during the build process to point to `iped.app.bootstrap.BootstrapUI` as the Main-Class attribute. When you execute `java -jar iped-search-app.jar`, the JVM automatically invokes `BootstrapUI.main()`, starting the bootstrap chain that eventually loads the UI through `AppMain`.

### Can I customize the IPED startup behavior?

Yes, developers can extend the `Bootstrap` class or modify [`AppMain.java`](https://github.com/sepinf-inc/IPED/blob/main/AppMain.java) to customize startup sequences. Since `BootstrapUI` uses the `getMainClassName()` method to determine the target class, overriding this method allows redirecting to custom bootstrap classes while maintaining the same JAR entry point structure.