简体   繁体   中英

Why does Eclipse show multiple application configurations when I try to run my application?

I get this pop up every time I run my project. Will this be a problem in the future?

What I did was building up the project with the same name while changing the name of older builds, any ideas?

Pop-up menu
弹出菜单

建树

  • Windows 10.
  • Eclipse 2021-03 (4.19.0)

If you build the new project with Spring Initializer then you should choose new name, keeping the same name for projects that you only change the name is not efficient for Eclipse because it uses the same project configuration files that are in metadata folder. Just changing the name is not enough to or Eclipse cleaning.

These are the names of "Run Configurations". I imagine all three of them refer to the same main class, but perhaps with different properties, I can only guess.

These aren't really "part of the project" per se, they're just artifacts that help you run the application locally for testing.

As to whether these will "cause you a problem in the future", except for having to select which run configuration to use each time, and not being able to tell which one does what, I don't see any way this could cause a problem.

Why does Eclipse show multiple application configurations when I try to run my application?

Because you have created all those configurations in your IDE. That's specific to IDE, and has nothing to do with Java


I get this pop up every time I run my project.

Because IDE doesn't know which is the configuration you want to use for running your application.


If the question is:

why do they exist?

You may want to run different main methods, in different ways, with different arguments, and so on. That's why "Run Configurations" exist, to have a pre-configured running setups - you just choose one of them and run your application accordingly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM