eclipse how to run a different class

16,205

Solution 1

select your class, then select the small triangle right to the green button, in the dropdown select "Run As" -> "Java Application"

Solution 2

Apart from ways mentioned in the other answers, you can also try this short key.

Short key : Press ALT + SHIFT + X then J

Hope this helps. :)

Solution 3

You can directly left click on your corresponding class code which you want to run and go to run as-->java application.hope this will help. :)

Share:
16,205
Nicholas Kong
Author by

Nicholas Kong

Updated on June 04, 2022

Comments

  • Nicholas Kong
    Nicholas Kong almost 2 years

    I want to work on my different class lets say for example house.java but the green play button seems to be locked a program called project.java and only that program. how do I tell Eclipse to run a different classes in the same folder besides the project.java?