Thursday, March 31, 2011

Eclipse: Using the -clean command line argument

Problem :

When i tried to open the velocity file in eclipse, i got the following error.

Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml

Solution :

Start eclipse with -clean option. This will do many wonders.

Using the -clean command line argument when starting up Eclipse can help a lot of strange problems disappear that can be related to stale plugin cache information. The way it is used is as an argument to the Eclipse executable, on Windows that is eclipse.exe:
Code:

eclipse.exe -clean

Additionally with Eclipse 3.1 there is a new eclipse.ini file that you can include -clean in on it's own line near the top of the file. This command tells Eclipse to erase and rebuild it's plugin cache to avoid conflicts with incorrect plugin information. This is very important to use when upgrading between major releases or trying to fix a strange behavior in your workspace. After you have used -clean once, you are free to remove it from your command line arguments.

No comments:

Post a Comment