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

前端 未结 6 1361
甜味超标
甜味超标 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:49

    Under Run Configurations, you can create multiple launch configurations under 'Java Application'. Create one with project as project1 and Main Class as com.pre.moveposition1 and try hitting Run.

    You should create one more for com.pre.moveposition2 if you want to run that one.

    Note: It is best practice to name classes to start with caps letters.

提交回复
热议问题