question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NoClassDefFoundError: javafx/application/Application

See original GitHub issue

When I give the distribution to another one to run, It will be broken, And then what I can do to fix it, In my mac, It works well. image @edvin

Error: Could not find or load main class wu.seal.demo.app.MyApp
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

And Their Environment is Java8 Also in my Linux VM with java11 run with the same problem. Is there any quick method to let others could run my tornadofx app?

I had also let others to run these command lines:

wget http://fxldemo.tornado.no/fxlauncher.jar
java -jar fxlauncher.jar

But with the same Error

It seems that javaFx is hard for using for others.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
edvincommented, Nov 11, 2019

A TornadoFX 1 based application requires Java 8 and JavaFX, just like any other JavaFX based application. If you install OpenJDK you will also need to install OpenJFX. For TornadoFX 2, the situation is the same, but Java 13 doesn’t include JavaFX, so it must be included with your application.

If you’re going to distribute your app to non-developers, you need to wrap it in an installer, or provide clear installation instructions. That’s what FXLauncher is for - it allows you to distribute a binary for each platform you want to support, and this binary will make sure to install all required dependencies, like the Java and JavaFX runtimes needed for your app.

NoClassDefFoundError: javafx/application/Application states that JavaFX is missing from the classpath, so it should be pretty straight forward for a developer to figure out. You shouldn’t bother your end users with that sort of issues, hence the installer route is the way to go 😃

0reactions
wusealcommented, Nov 14, 2019

@edvin Tks for your detail instruction! Let me research FXLauncher later 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NoClassDefFoundError: javafx/application/Application
You are getting this error because your runtime PATH to javafx is probably incorrect or missing. Please, follow these steps:.
Read more >
JavaFX Exception in thread "main" java.lang ... - Stack Overflow
JavaFX Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application · possible duplicate of jdk1. · I declared my ...
Read more >
Cool IT Help - YouTube
Error Fixed - Caused by: java. lang. NoClassDefFoundError : javafx/application / Application. 9.1K views 6 months ago. Cool IT Help. Cool IT Help....
Read more >
java.lang.NoClassDefFoundError: javafx/application ... - GitHub
Hi, I am using Ubuntu 16.04.4. I get a NoClassDefFoundError when I run java -jar ~/Downloads/rodain-app-2.1.0-beta.7_OtherOS.jar ...
Read more >
java.lang.NoClassDefFoundError: javafx/application ...
I just started working through this online textbook I am trying to run one of the sample GUI programs (GUIDemo, section 1.6) in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found