← Back to Blogs

How to Fix the Java Web Start Error: NoClassDefFoundError javafx/application/Application

Published on February 27, 2026 • Technical Guide

Have you encountered the infamous java.lang.NoClassDefFoundError: javafx/application/Application error when trying to run a Java Web Start application? This frustrating crash often halts enterprise apps and legacy software dead in their tracks. In this blog post, we'll dive into what causes this error and provide step-by-step solutions to get your JavaFX application up and running smoothly.

For more detailed guides and insights, check out these excellent resources:

Understanding the Error: Why Does This Happen?

To understand the problem, we have to look at the history of Java Web Start (JWS) and JavaFX.

In Java 8, Oracle bundled JavaFX directly inside the Java Development Kit (JDK) and Java Runtime Environment (JRE). The JNLP files used by Java Web Start could easily find the blueprints for modern GUIs, meaning JavaFX apps just worked right out of the box.

However, starting with Java 11, the JDK became lighter and more modular. Oracle stripped JavaFX from the core JDK and moved it to an independent, open-source project called OpenJFX. Furthermore, Java Web Start was deprecated in Java 9 and completely removed in Java 11 due to evolving modern web security standards.

When you see the java.lang.NoClassDefFoundError: javafx/application/Application output, it means that the application was compiled successfully, but at execution time (runtime), the Java Virtual Machine (JVM) looked for the main class required to draw the application window (javafx.application.Application) and couldn't find it.

Here are the most common causes:

  1. Missing JavaFX Libraries: Running Java 11 or later without explicitly adding OpenJFX to your path.
  2. Incorrect Java Version: Trying to launch with a JRE that lacks JavaFX support.
  3. JNLP Misconfiguration: The .jnlp file is missing proper references to the necessary JavaFX JARs.
  4. Outdated Java Web Start: Using an unsupported or poorly configured version of JWS.

Step-by-Step Solutions to Fix the Error

Depending on whether you are an end-user needing quick access or a developer maintaining an application, here are the most effective methods to resolve the issue:

Method 1: The Quick Fix – Reverting to Java 8

If you need immediate access to an internal company tool and your IT policies allow it, the fastest solution is downgrading to Java 8, as it natively includes both Java Web Start and JavaFX.

  1. Uninstall Current Java: Go to your system settings/control panel and remove newer Java versions to prevent conflicts.
  2. Download Java 8: Visit the Oracle Java Archive or use Adoptium (Eclipse Temurin) for legacy Java 8 builds.
  3. Install and Configure:
    • Set the JAVA_HOME environment variable to point to your new Java 8 folder (e.g., C:\Program Files\Java\jre1.8.0_301).
    • Update your Path variable to include %JAVA_HOME%\bin.
  4. Associate the .jnlp File: Right-click your .jnlp file, select "Open With," and point it to C:\Program Files\Java\jre1.8.0_X\bin\javaws.exe.

WARNING: Running Java 8 in the modern era comes with security risks. Use this method only for trusted, internal corporate applications isolated from the public internet.

Method 2: The Modern Alternative – Using OpenWebStart

Since Java Web Start is deprecated in modern Java versions, OpenWebStart (OWS) is the best way to run JNLP files today (Java 11+). OpenWebStart uniquely includes built-in features to dynamically handle missing JavaFX dependencies!

  1. Download OpenWebStart: Get the installer for your OS from the official OpenWebStart website.
  2. Install: Run the installer and allow it to associate with .jnlp files automatically.
  3. Configure JVM Manager: Open the "OpenWebStart Settings" application and navigate to the "JVM Manager" tab to specify the Java versions it is allowed to use.
  4. Enable JavaFX Downloads: Ensure OWS is set up to automatically download OpenJFX if requested by a JNLP file but not found locally.
  5. Launch Your App: Double-click your .jnlp file. OpenWebStart will read it, dynamically download the necessary OpenJFX modules, inject them into the classpath, and run your application securely.

Method 3: Add JavaFX Libraries Manually (For Developers)

If you are a developer updating the application and running Java 11 or newer, you'll need to add OpenJFX explicitly.

  1. Download OpenJFX: Download the appropriate SDK for your platform from the OpenJFX website.
  2. Update Your Classpath: Extract the SDK (e.g., to C:\javafx-sdk-17). Modify your run command to include the specific module path:
    java --module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml -jar YourApp.jar
  3. Maven/Gradle Projects: Add the javafx-controls and javafx-fxml dependencies specifically to your pom.xml or build.gradle configurations so they are pulled in at build time.

Method 4: Update the JNLP File Configuration

If you're sticking to a traditional JNLP deployment, you must ensure it actively points to the correct JavaFX dependencies.

  1. Open your .jnlp file in any text editor.
  2. Ensure the <resources> section includes explicit JavaFX JAR references:
    <resources>
        <j2se version="11+" href="http://java.sun.com/products/autodl/j2se"/>
        <jar href="YourApp.jar" main="true"/>
        <jar href="lib/javafx-controls.jar"/>
        <jar href="lib/javafx-fxml.jar"/>
    </resources>
  3. If your application relies on modules, explicitly specify them as properties:
    <resources>
        <property name="jnlp.javafx" value="javafx.controls,javafx.fxml"/>
    </resources>
  4. Sign Your Code: Remember to sign all JARs (including JavaFX dependencies) using the jarsigner tool, as Java Web Start strictly requires this for security.

Conclusion

Encountering a NoClassDefFoundError for JavaFX might seem frustrating initially, but it’s simply a symptom of the changing landscape of enterprise Java deployment.

Whether you opt for a legacy Java 8 environment to keep the lights on, upgrade to the excellent OpenWebStart ecosystem, or explicitly declare your OpenJFX dependencies within your app, there is always a reliable path forward to get your applications running again.

For more deep-dive scenarios and in-depth troubleshooting checklists regarding this error, make sure to visit these resources: