What does the -clean parameter mean in the Eclipse IDE?

38,325

Solution 1

No you can simply launch eclipse.

The article "keeping eclipse running clean" details the various usages for "the -clean" option.

The easiest way to fix up a dusty workspace is using the -clean command line argument to the eclipse.exe executable. Let's take a look at what the Eclipse help docs tell us this command does:

if set to "true", any cached data used by the OSGi framework and eclipse runtime will be wiped clean. This will clean the caches used to store bundle dependency resolution and eclipse extension registry data. Using this option will force eclipse to reinitialize these caches.

The -clean argument is a one-time use flag, meaning after you have run Eclipse using it, you can remove it until you need it again.
If you prefer to leave it set the only side effect of using it ever time are increased startup times (2-3x longer) which some folks do not mind.

Now, back to the description above, this may not sound like much, I have to say that you would be amazed at what using -clean can fix up sometimes; some really random things. There are three easy ways you can go about using this argument:

  • Edit the eclipse.ini file located in your Eclipse installation directory and add it as the first argument on the first line.
  • Edit the shortcut you use to start Eclipse and add it as the first argument.
  • Create a batch or shell script that calls the Eclipse executable with the -clean argument. The advantage to this step is you can keep the script around and use it each time you want to clean out the workspace. You can name it something like eclipse-clean.bat (or eclipse-clean.sh).

Solution 2

If you're developing Eclipse plug-ins, you want to use the -clean parameter on the Eclipse application you start to test your plug-ins.

Otherwise, as VonC already answered, -clean is a one-time use flag, meaning after you have run Eclipse using it, you can remove it until you need it again.

Share:
38,325

Related videos on Youtube

user310291
Author by

user310291

nada !

Updated on July 09, 2022

Comments

  • user310291
    user310291 almost 2 years

    I have read that after installing some Eclipse plugins manually, one should use the -clean parameter to start Eclipse. Why or what does it do?

    Do I have to do something else?

    This question applies to Eclipse Galileo and Helios, in particular.

    • VonC
      VonC almost 14 years
      To moderators, this has nothing to do with superuser": this is a "**software tools commonly used by programmers", 100% in the StackOverflow FAQ: stackoverflow.com/faq