Tip: Quickly Restart Eclipse

by Venu on July 6, 2007

There are times when you need to restart Eclipse (other than the obvious reasons)

  • If you are running the IDE for days together, the IDE does become sluggish. A quick look at the memory occupied by Eclipse also is an indication to restart Eclipse
  • If you install new plugins when the IDE is active/open, the new plugin functionality is not activated until you restart Eclipse.


The normal way to restart is to close the IDE (saving the workspace) and again run Eclipse.exe. If you have a shortcut, it would definitely help you to start Eclipse quickly.

However there is another easy way to restart Eclipse:

File -> Switch Perspective -> Choose your Current Workspace

eclispe1

If you use more of keyboard than mouse, you should do this:

Alt + F + W -> Select your current Workspace

This will quickly close Eclipse and restarts the IDE using the same workspace that you were working on.

If you have installed any new plugins, they will be loaded during the restart. (In some rare cases, the plugin might not load and hence you might have to do “eclipse -clean“)

{ 9 comments… read them below or add one }

1 john July 9, 2007 at 4:37 pm

quote: “If you install new plugins when the IDE is active/open, the new plugin functionality is not activated until you restart Eclipse.” This is just wrong, you can apply changes to install the new plugins. Which might or might not work depending on the plugin, since it’s hard to write a fully dynamic enabled plugin.

2 Venu July 9, 2007 at 6:24 pm

John are you suggesting that its possible to activate the plugin without restarting eclipse. I am not sure what you are meaning by “apply changes”

I have never installed the plugin using update site, i am not sure if there an option there to apply changes. However if you install eclipse plugins by copying it to the eclipse plugins folder/or if you use the links concept, the only way to apply the changes is to restart eclipse. Please Do correct me if I am wrong.

3 kapil July 10, 2007 at 11:51 pm

Your “Quick Restart method” is actually much slower than making a proper exit and clicking a shortcut from quick launch bar.

4 Venu July 11, 2007 at 12:33 am

Kapil, may i know on what basis you found this slower. I hope you didn’t run the stopwach and test it.
As I mentioned in the post, its quicker if you have a shortcut icon on the quicklaunch.

But switching workspace does the same thing,
Saves workspace
Restarts Eclipse with the selected workspace.

There is nothing which would make this process slower.

5 Vijay November 10, 2008 at 3:58 pm

Very useful tip. Thanks for sharing it.

6 Srilakshmi December 15, 2008 at 5:43 pm

Hi,

How do u restart the eclispe platform programatically?

After I do an auto update programatically I want the installed plugins to be refleclted immediately.

Thanks
S.Srilakshmi

7 Venu December 21, 2008 at 3:25 pm

Srilakshmi -When I install a plugin, I do get a option to say “Apply Changes” and I don’t have to restart. I also prompts me to reset the workspace, in case new menu items or views have been added to the perspective.

You might want to see what “Apply changes” does in Eclipse code and simulate that behavior.

8 justen July 7, 2011 at 5:56 pm

(In some rare cases, the plugin might not load and hence you might have to do “eclipse -clean“)

But how to do” eclipse -clean”? plz anyone have idea?

9 Thein Htike Aung April 19, 2012 at 5:29 pm

Thanks a lot :D

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: