Note that there are some explanatory texts on larger screens.

plurals
  1. POJavaFX Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
    primarykey
    data
    text
    <p>I'm getting this error</p> <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Ap plication at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException: javafx.application.Application at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 13 more </code></pre> <p>When trying to run my class file, this is the source</p> <pre><code>import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; import java.util.concurrent.Executor; public class TestApplication extends Application{ @Override public void start(Stage stage) throws Exception { new TestApplication(); } public TestApplication() { try{ final Parent root = FXMLLoader.load(Executor.class.getResource("test.fxml")); final Stage stage = new Stage(){{ setScene(new Scene(root, 300, 250)); setTitle("Test"); setResizable(false); show(); }}; }catch(Exception e){ e.printStackTrace(); } } } </code></pre> <p>The fxml file contains a simple gui.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload