• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
16 views

Problem :

I am getting following error while trying to execute JavaFX code

javafx application class must extend javafx.application.application

by (6.9k points)  
edited by

1 Answer

0 votes

Solution :

I think you do not have a main method in your class as the error suggests. 

Please replace the static with bellow syntax

PFB Syntax for main() in Java

public static void main(String[] args) 

{

}

and it works fine for me. 

Also please note it is not possible to run a Java program without main method so you are getting the error.

Further Readings:

https://github.com/RaftLib/shm/issues/3

by (20.3k points)  
edited by
...