• Register
0 votes
1.5k views

Problem :

I am getting following error while trying to execute JavaFX code

javafx application class must extend javafx.application.application

6 5 3
6,930 points

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

9 7 4
38,600 points

Related questions

0 votes
1 answer 24 views
0 votes
1 answer 404 views
404 views
Problem : Everytime we compile the GUI , we get bellow error exception in thread "javafx application thread" java.lang.nullpointerexception
asked Oct 19, 2019 peterlaw 6.9k points
0 votes
1 answer 973 views
973 views
Problem : Currently I am having issues while figuring out why am I receiving below error "Local variables referenced from an inner class must be final or effectively final". My program is running the concurrent threads to sort the array of #'s and then trying to find the high ... myhigh) myhigh = numbers[myindex]; System.out.println(myhigh); } . . . . } Above block of code is producing the error.
asked Dec 25, 2019 alecxe 7.5k points
0 votes
1 answer 5 views
5 views
Problem: Is extend faster than append?How do you use append function?The append() method in python adds a single item to the existing list. It doesn't return a new list of items but will modify the original list by adding the item to the end of the list.what happening after executing the method append on the list the size of the list increases by one.
asked Nov 4 Mashhoodch 1.8k points
0 votes
1 answer 452 views
452 views
Problem : In my code have main method in it. The program compiles on jgrasp with no errors but it keeps giving me a message as bellow: "no main methods, applets, or Midlets found in file jgrasp"
asked Nov 1, 2019 peterlaw 6.9k points