What does it mean: JavaFX application class must extend javafx.application.Application?

What is meant by this error: Error: Main method not found in class Static.A, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application I was trying to run a program Without main Method.. public class A { static { System.out.println(“Hello”); System.exit(0); } }

The import javafx cannot be resolved

According to the packages list in Ubuntu Vivid there is a package named openjfx. This should be a candidate for what you’re looking for: JavaFX/OpenJFX 8 – Rich client application platform for Java You can install it via: sudo apt-get install openjfx It provides the following JAR files to the OpenJDK installation on Ubuntu systems: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfxswt.jar /usr/lib/jvm/java-8-openjdk-amd64/lib/ant-javafx.jar /usr/lib/jvm/java-8-openjdk-amd64/lib/javafx-mx.jar Hope this helps.

JavaFX and OpenJDK

JavaFX is part of OpenJDK The JavaFX project itself is open source and is part of the OpenJDK project. However, the OpenJDK project includes many projects, including incubating projects and other projects, such as OpenJFX, whose source and implementation are not shipped as part of some JDK/JRE distributions (e.g. Oracle JDK 11+ implementations and many … Read more