0

Earlier when i am creating a new class for practicing programs in Eclipse. I use to create in same project and it used to run well. But lately i have to specially go to Run>Run Configuration> I have to manually select the project and main class.

Is there any configuration i m missing as this is time consuming to every time go and change the main class.

Can anyone help?

2 Answers2

0

You can press the black arrow near the Run button to select what to run, usually you will find your classes with public static void main(String[] args) there. That's how it works for me.

Run button

ArianJM
  • 676
  • 12
  • 25
0

The problem can be due to new class files not being generated due to errors. I have seen the same results as you (new changes not picked up) due to one or both of the following.

1) Look for red-! or red-X next to a project and fix the problem(s) in that project.

enter image description here

2) Check the Problems tab and fix all red-X errors.

enter image description here

Java42
  • 7,628
  • 1
  • 32
  • 50