HI am getting while running scala program in eclipe .this is my first program please help me out .



0

HI am getting while running scala program in eclipe .this is my first program please help me out . 

 

I am getting this errory "Error: Main method not found in class example1.demo1, please define the main method as:
   public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application

 

I am attaching a screen sort.
"



1 Answer(s)


0

Hi Rakesh,

First thing, example code you have written is fine. The error is not because of the code.

Please verify few things to resolve the issue:
1. Make sure you are using the "run as Scala application" option in Eclipse.

2. Cleaned the project once or delete .m2 directory.

3. Rename the demo1 to demo2 or something else. It will force the compiler to reset the package once.

Please try above and let me know if any of the above work for you or not.