how to setup “Main Class” in “Run Configurations” in Eclipse

前端 未结 6 1355
甜味超标
甜味超标 2020-12-02 00:19

In a Java project, there have two java files has main method. The absolute paths for these two java files are:

C:\\Desktop\\project1\\src\\com\\pre\\moveposi         


        
6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 00:56

    Put the (fully qualified) name of the class containing main. For example, if you want to use moveposition2's main (and not moveposition1's) then you'd enter:

    com.pre.moveposition2
    

    Also, clicking on "Search..." should give you a list of classes that contain main() methods that you can choose from.

提交回复
热议问题