简体   繁体   中英

Is there a way to delete meta-data on Eclipse run configurations?

I may have a corruption problem in Eclipse run configurations. This happened after I dragged (or copy-pasted, I don't remember) a Java class called MyClass from project1 to project2 . Then I deleted project1 . When I create a new run configuration the name given is MyClass (1) . In other words, it thinks there is already a run configuration called MyClass , so the new one will have to have a number appended. ( Edit: There is no existing MyClass run configuration so there is no apparent reason for the appended number. In fact, I deleted all of my run configurations.)

How can I easily clean up meta-data and be able to build again with minimal manual effort?

If there is a meta-data deletion recommendation that gets rid of more than just run configurations, that probably would still be a good solution, if it does not create a lot of manual work to get set up to work again.

Edit: The problem might be caused by the fact that there is a launch configuration named MyClass - project1 visible in the export dialogue. project1 no longer exists, but this remnant lives on, tying up the class name MyClass . I am not sure if there is a difference between a run configuration and a launch configuration.

AFAIK launch configurations are stored on:

${WORKSPACE}/.metadata/.plugins/org.eclipse.debug.core/.launches

Take a look to the existent configurations and remove those that are not interesting to you.

And restart Eclipse

Open Eclipse. Follow Run => Run Configurations . You will see options on the left hand side. Under the Java Applications option, you will see the list of runnable classes (the ones have a main method). These class nodes on that list are right clickable. By right clicking on your running configuration, you will see New , Duplicate and Delete options. You can delete your old running configuration via delete option. To create a new running configuration, right click on Java Applications option and click on New and then configure it.

You could try starting eclipse with the -clean command line option .

On windows the easiest way to do that is to copy your shortcut to eclipse and add the option to the arguments list, then start using the new shortcut.

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