Install Eclipse Plugins - The Easy Way

by venukb on August 20, 2006

Eclipse as of today is the industry’s major non-Microsoft software tool platform. The number of companies adopting this platform is a testimonial of the platform’s success.

(Check my previous post for more on the history of Eclipse IDE)

Eclipse has a well-designed, and extensible architecture. What is valuable about Eclipse is that it provides an open source platform for creating an extensible integrated development environment. This platform allows anyone to build tools that integrate seamlessly with the environment and other tools.

The key to the seamless integration of tools with Eclipse is the plug-in. With the exception of a small run-time kernel, everything in Eclipse is a plug-in. This means that a plug-in you develop integrates with Eclipse in exactly the same way as other plug-ins.

Any new person who is introduced to Eclipse in concerned with one important question : How to Install Eclipse Plugins ?

There are lot of useful, high quality third party plugins available and all the plugin installation instructions specify at most 2 ways to install Eclipse Plugins

Normal Ways of Installing Eclipse Plugin

I will take the Eclipse Webtools Plugin to describe the 2 “normal” ways of installing Eclipse Plugins. In the next section I will show how the same can be done in a “easy” way.

This is how the Eclipse SDK folder structure looks like:

After extracting the Webtools package you have this folder hierarchy:

One of the common method of installing is to copy the contents of the “features” into the “features” folder of eclipse, and do the same with the “plugins” folder.

The other way of installing, which Eclipse also recommends is via the Update Manager.

You can choose the components you wish to install, choose the dependent plugins etc. In this process, generally you select the default installation location specified by the wizard.

The advantage with this approach is that when you select a component you are also made aware of the dependent plugins that needs to be installed. For e.g. If I select Web Tools, I am also told to select/install GEF

The disadvantage with this approach is that it never works well in a low bandwidth environment. I have struggled so many times to install via update manager, somewhere its gets stuck and I am left with a partially installed, corrupted environment.

The Easy Way

Now for the “Easy” way of installing Eclipse Plugins. Very few people are aware of this concept and Eclipse somehow doesn’t seem to document this approach anywhere.

This method uses the concept of “Links”. Here is the step by step procedure. (In the explanation I have used the installation of Webtools as the example)

1. Create a folder named links inside the eclipse folder (See Picture below)

2. Create a new file inside this folder and name it as say wtp.link. Note that the file name can be any valid string, but the extension has to be link.

3. Assuming that I have copied the Web tools into D:\thirdparty as shown below,

the contents of wtp.link has to be this:

path=D:/thirdparty/wtp

Points to Note:

  • The string should always start with “path=” keyword.
  • The path should point to a directory which has a “eclipse” folder which in turn has “features” and “plugins” as sub-folders
  • It is recommended to use forward slash ‘/’ in the path (If you want use Backslash, see that you use the escape character i.e. in Windows it should be “\”)
  • The file extension should end with “link
  • The file (i.e wtp.link in our example) should exist in the “links” folder.
  • It is recommended to create link files only for big plugins/applications. For small plugins you can create just one link file, say misc.link and copy all the small plugins to the path referred by this link.

Restart Eclipse and now all the plugins and feature descriptions should be read from the path referred by the “link” files.

Advantages

Eclipse has a lot of top level and technology projects. To experiment with these projects, the “links” concept comes to the rescue. You can extract the plugin to a “thirdparty” (or a folder of your choice) and just link it within the eclipse installation. My current configuration looks like this:

Eclipse Projects/Third Party Plugins

Corresponding Link files

The “Copy” approach just bloats the eclipse installation and you cannot remove/uninstall the plugin easily. With links approach, you can just remove the “link” file and the plugin is uninstalled !!

The same links directory can be used in another eclipse installation. For e.g. if you are working with Milestone or different version of Eclipse, you can just copy the links folder (containing .link files) and the plugins are installed.

It is very easy to manage different versions of a plugin. If a new version doesn’t work, reverting back to a previous version is pretty easy.

Also, if you use the update feature in Eclipse, you can choose one of the above folders as the installation directory.

Conclusion

This approach seems to work fine in both windows and linux. I am not sure why this approach is not documented in Eclipse. I found out about this when I was using the trial version of RAD (Rational Application Developer). It was used primarily to manage product extensions. I believe the same concept can be used to manage plugins (Install/Uninstall).

Hope this post was useful, if you had any problems using this approach, do leave a comment with the problem description.

Popularity: 85% [?]

{ 60 comments… read them below or add one }

1 Hornburg 08.24.06 at 1:56 am

help > software updates > manage configuration then righ click on “Eclipse SDK” add > extension location

it’s kinda faster

2 Venu 08.24.06 at 9:17 am

Hornburg, yes it might be faster by adding extension location. But if the scenario is working between multiple versions of eclipse and multiple versions of plugin, then u can easily move around the plugins.

If you are doing it one time, I guess the “add extension location” makes more sense.
A visitor pointed me to this article which explains this concept

http://blog.exis.com/colin/archives/2004/12/23/managing-plugins-in-eclipse/

3 Philippe 08.24.06 at 10:01 am

FYI, i am one of the maintainers of an eclipse distros called EasyEclipse which install all its plugins like that.

4 venukb 08.24.06 at 10:12 am

Philippe, checked EasyEclipse Pretty nice..But I didnt get by what you meant by “that” you use links concept or the Extension location concept ?

5 Bhaskar G 09.22.06 at 11:27 am

Hi,

This is a nice article.
How do I used environment variables in the .link file.

can I use the following
path=${HOME}/plugins

Regards,
Bhaskar

6 Venu 09.22.06 at 11:43 am

Bhaskar, thatz an interesting question ! I have not used eclipse on unix environment, if it works it will be great. Can u check it and let me know !

I will check on windows,but my feeling is that it might not work otherwise IBM should have used this quirk on their RAD installation :)

7 Bhaskar G 09.25.06 at 10:18 am

Hi Venu,

I have tested this. This feature is not working.

Regards,
Bhaskar

8 Venu 09.27.06 at 9:27 am

Thanks Bhaskar, for checking on that..
I guess we have to manage with the “famous” copy paste mechanism :)

9 Comic Viewer at Online Diary 10.06.06 at 1:50 am

[...] The only drawback I see is that, Comex is now bundled as a plugin and we cannot expect every other comic reader to have Eclipse !! I would like to see Comex released as an Eclipse RCP application. [...]

10 William 11.21.06 at 8:57 pm

Hi,

This is an excellent article.

It might not be an easier way to install eclipse plugins, but for sure it is a better way to install and maintain eclipse plugins.

Thanks,
William.

11 venukb 11.23.06 at 9:48 am

Thanks William, i do agree creating and setting up those links is a little pain, but once its in place its not that difficult to move/edit these files :)

12 Daivd Farrell 12.01.06 at 1:31 am

I’ve been using this technique for ages. I discovered it after installing MyEclipseIDE and seeing how it installed.

A couple of slight additions:

* EVERY plugin folder contains the version in its name so I can easily track multiple versions

* I keep a copy of each .link file in the /thirdparty folder so I can quickly select and copy the plugin’s I want and paste them into Eclipse’s /links folder. It also helps prevent typo’s because you only have to get it right once.

* The .link files have the EXACT same name as the plugin folder.

Hope that helps,

-Dave

13 Venu 12.01.06 at 11:58 am

I don’t completely agree on the first point, its not mandatory for a file name to have version.

Second point regarding keeping the link files in the thirdparty folder is a nice idea :)

And .link file name can be ANYTHING .. as I have mentioned in the post, it can be any valid file name and it doesn’t need to match the name of any plugin folder

14 Philippe 12.19.06 at 2:30 pm

> venukb wrote on August 24, 2006 @ 10:12 am
> you use links concept or the Extension location concept
we use both:
- all plugins are packaged with an eclipseextension
- at install time a link file is created with the installer

15 Roman Porotnikov 12.22.06 at 2:29 pm

I use several Eclipse configurations with the same Eclipse install and so run Eclipse with different values of “-configuration” parameter. Different configurations may have different sets of plugins, including different versions of the same plugin that would conflict if installed in the same configuration. For such case, I believe the only way to go is to use extension locations, because links are shared between configurations and extension locations are not. Nevertheless, I have several plugins shared among all the configurations I use, so links-based approach will simplify the process of management of such shared plugins.

16 Venu 12.23.06 at 12:43 am

Hi Roman,
I have read about the -configuration argument, however I have never found out a way to use it properly. I tried “googling” around but couldn’t find much. How is that argument used ?

17 Roman Porotnikov 12.26.06 at 7:43 pm

When setting up the new configuration I just copy the “configuration” folder from the eclipse install to another location and then launch eclipse like “eclipse -configuration new_config_dir”. So, info related to all the plugins I add via configuration manager is stored in the new_config_dir instead of the eclipse/configuration. I repeat the procedure with another directory when I need a different set of plugins.

18 Venu 12.27.06 at 8:56 pm

Nice :) never realized you could handle plugins that way also.. will try it out. Thanks :)

19 Eclipse for Everything - javanese » ???? ???? (???) ?? ???? 01.10.07 at 10:14 am

[...] Install Eclipse Plugins - The Easy Way? ????. ?? ?? ??? ???? ? ???? ??. [...]

20 anitsirK 01.30.07 at 10:45 pm

Has this links folder and links file technique been used successfully by anyone on any of the Rational version 7 line of products?

I can enable my plugin using the “add an extension location” GUI operation, but RSA, RSM and RAD appear to completely ignore the links folder.

21 Rajesh 02.04.07 at 11:20 am

Hi,
I installed a plugin using software help->Software updates ->find and install link in RAD. How do I uninstall it?

22 Kevin Roche 02.16.07 at 4:29 pm

This looks ideal for me as I want to try several plugins before deciding which ones to use. Unfortunately it seems to work some of the time but not all of the time.

I tried the technique with CFEclipse and Aptana and they work well, but JSEclipse did not show up as a perspective when I tried that. Should it or does it work some other way?

Also wnted to use XML Buddy but it did not seem to have the right directories when I unzip the distro.

Any ideas?

23 venukb 02.17.07 at 12:00 am

Hi Kevin,
I have loaded lots of plugins using this approach and none have failed. Even if they have, its because of my mistake in not conforming to the folder layout.

The .link file should point to a directory which has eclipse directory and this eclipse directory should have plugins and features folder.

Some of the places where you might make a mistake
1. Path name given in the link file (Also note that the path should have forward slash /)
2. Directory structure not in proper format

If both of these are fine, then your plugin might not be loading because of some missing dependent plugins. Start eclipse with a -clean option and check Error Log View in Eclipse. You should find logs if any plugin is not loaded properly.

24 hima bindu 03.06.07 at 12:48 pm

RAD is not displaying installed plugin:(

i installed the “metrics plugin”(web: http://sourceforge.net/projects/metrics) to find the code metrics in RAD.

Usually after installation in Eclipse, i will select a project and right click on it to see the ‘properties’ and ‘Enable Metrics’ in that view. But in RAD 6.0.1 (Eclipse version 3.0.2) it is not working.

Can anyone verify this? Kindly tell me how to solve this problem, as i have to run the metrics plugin in RAD 6.0.1.

25 hima bindu 03.06.07 at 12:55 pm

hima bindu
Mar 6th, 2007 at 12:48 pm
continued..

by the way, your method works fine in eclipse (3.1) but in RAD eclipse it doesnt.

26 anitsirK 03.06.07 at 7:14 pm

To hima bindu: This method doesn’t work in Rational 7 products because IBM disabled it. I found this link with alternate methods, when I was trying to get this to work on those products:

27 hima bindu 03.07.07 at 10:14 am

hi anitsirK ..
i was talking about version 6 of RAD… can u plz tell me whether this works for version 6 also??

28 anitsirK 03.07.07 at 11:06 pm

hima bindu:

Yes, it does. If you look in the …\IBM\Rational\SDP\6.0\eclipse directory (assuming you’ve installed to the default location), there’s a links folder already there, and IBM actually has several files in there when you first install the product (com.ibm.rational.rad.link for example). Put your .link files in there, and it should work, as long as your plugins work on RAD 6.

In the version 7 line (RSM, RAD, RSA), this no longer works. Why IBM seems to like removing features, then selling it as an upgrade, I’ll never understand.

29 alex 04.12.07 at 1:38 am

hi nice site.

30 [tourist].Tam 05.17.07 at 9:18 pm

just tried and did a fresh install after having read this post (and a few other on the topic). And I couldn’t have the “windows” way to write the path to work….

But it works fine ^_^

Tam

31 venukb 05.17.07 at 9:40 pm

And I couldn’t have the “windows� way to write the path to work….

Tam I didnt understand this part of your comment. Did you have any trouble with “links” approach ?

32 HowTo: Tail Files in Eclipse IDE - Online Diary 05.19.07 at 11:29 pm

[...] P.S. Also you want want to Install Eclipse plugin’s easily using “Links”. [...]

33 How To: Browse remote files in Eclipse IDE - Online Diary 06.07.07 at 10:57 pm

[...] Install the RSE plugin. I would recommend to install the plugin using the “links” concept [...]

34 Kevin Roche 07.04.07 at 3:29 pm

Venu,

I tried your suggestions to understand why the JSEclipse plugin is not working but can’t see any problem with the .link file or athe way the path is written. It’s just like the others and they all work.

I have decided that it is probably that it was built for Eclipse 3.1 and I am using 3.2. I guess I have to wait for a new version.

35 venukb 07.04.07 at 3:56 pm

Kevin, I tried to test it out, but seems like its acquired by Adobe and requires some login to download.

Anway, the only way to find out whether the plugin is loaded is via the “Error Log” view. It will report if the plugin failed to load and also the reason
(like some API mismtach or dependent plugin missing etc)

36 EclipseTips.com is now online 07.05.07 at 3:45 pm

[...] History of Eclipse [...]

37 Confluence: IS - Applications Division 07.26.07 at 6:59 pm

Eclipse…

Introduction This page should contain useful bits and pieces on Eclipse.  Defeng had added a page under uPortal Setup local development environment for uPortalabout how to setup eclipse for uPortal 2.5.3. Plugins Management This page…

38 Jay 07.29.07 at 8:21 am

Hi,
Does anyone know how to install eclipse v3.3 in RAD 7.0.
Currently it uses eclipse v3.2

39 Tavo 08.01.07 at 10:22 pm

Hi
i have a question… the Tail plugin for Eclipse (version 0.5.0), works in eclipse 3.2.2 with MyEclipse 5.5.1 GA?.
I have a copy and a tried to install but don’t work.
Sorry for my english.
Bye bye.

40 steve 08.15.07 at 1:36 pm

It doesn’t work for me with the Subclipse plug-in and there is no error log report for it.

It installed fine with the update manager. What I did notice was that when installing with the update manager I had to agree to license conditions before installation. Could the lack of license agreement be what the link method is getting blocked by without reporting an error?

41 Venu 08.15.07 at 5:53 pm

Jay,
I do remember that RAD has a distinct folder which has the base Eclipse SDK. However I wouldn’t recommend changing that, since the plugin’s based on Eclipse 3.2 might no longer work with 3.3 (If there are API changes)

Tavo,
The Tail Plugin is very old and was last updated on Nov 18 2003. Probably the plugin api no longer works with Eclipse 3.2.2. When you start Eclipse, have a look at the “Error Log” view. The view shows details on plug-in load failures.

Meanwhile check on this post for an alternative way of Tailing Log files on Windows

42 Venu 08.15.07 at 6:02 pm

Steve,
The license page in the update wizard pops up for every plugin installed via the update mechanism.

To test out, I downloaded the Subclipse plugin from this URL:
http://subclipse.tigris.org/files/documents/906/38385/site-1.2.3.zip

extracted the contents and copied it to a folder structure like this.

subclipse

I also created a “link” file pointing to the Subclipse folder <code>path=D:/europa/subclipse</code> and I was all set. I could configure settings via the SVN preference page and also switch to the SVN perspective.

As mentioned in the post, one thing to note is the folder hierarchy. For E.g. If you have forgot to create a “eclipse” folder inside “Subclipse”, the plugin would never load.

43 jim wallis 08.28.07 at 6:55 pm

I’m doing something wrong and would appreciate an extra set of eyeballs to get this installation method moving forward.
I have a very simple jar file that, when, copied to the eclipse/plugin directory, works perfectly.
Just to keep it simple, the jar file only contains the META-INF/MANIFEST.MF file, the content xml file, and the
plugin xml file.

As per the instructions, I did the following:
under: eclipse/links/aaa.link is
path=C:/tpplugins/aaa

under C:\tpplugins\aaa I did the following:
created C:\tpplugins\aaa\eclipse\features and C:\tpplugins\aaa\eclipse\plugins

in the folder C:\tpplugins\aaa I did the following:
copied the jar file.
extracted the jar file so that I had:
C:\tpplugins\aaa\bbb.jar
C:\tpplugins\aaa\META-INF\MANIFEST.MF file
C:\tpplugins\aaa\content.xml
C:\tpplugins\aaa\plugin.xml

Restarted Eclipse. No errors messages were encountered on startup and nothing was logged in error log file.
Tried all combinations of the above files. Just the jar file, just the files themselves, and all files.
The files were not listed under the help>> cheatsheets.
Any ideas? Thank you in advance.

44 venukb 08.28.07 at 10:07 pm

Jim, with eclipse 3.2 and above, you don’t need to extract the JAR file.

You should copy or extract to the following path
c:\tpplugins\aaa\eclipse\plugins.

you seem to be extracting at c:\tpplugins\aaa which is wrong.

45 jim wallis 08.29.07 at 9:32 am

Venukb,
Bingo!! I feel like Uncle Eddie in Christmas Vacation.
Here is what worked.
Copied jar file to C:\tpplugins\aaa\eclipse\plugins.
Restarted Eclipse.
The world was right again.
I wanted to locate where I had problems with the original directions.
I think it was with step #3 in the original article.
It says, “Assuming that I have copied the Web tools into D:\thirdparty as shown below”, etc…
I certainly didn’t get it.
Well what was copied and, really, where was it copied?
Better would be “Copy jar file to C:\tpplugins\aaa\eclipse\plugins”
Venukb, I can’t thank you enough. Your reply made a difference. I was ready to throw in the towel.
Thanks again,
Jim

46 venukb 08.29.07 at 11:17 pm

Jim, Glad you got it working :)

I did re-read the post again. If you notice, I do mention WTP package and its hierarchy before staring with the steps.

Irrespective of this, I will definitely change point 3; I myself was confused a little bit by the ordering.

47 Gold 09.11.07 at 11:34 pm

[…] Install Eclipse Plugins - The Easy Way? ????. ?? ?? ??? ???? ? ???? ??. […]
+1

48 Thell 09.27.07 at 1:35 am

How do the feature loading methods (update, .eclipseextension, .link) differ from the plugin perspective?

ie:
When using the update manager duplicate plugins don’t seem to be downloaded and versions are checked, so when you restart eclipse it doesn’t spend wasted time trying to load a plugin that has already been loaded.
-vs-
When using the .eclipseextension; if there exists a plugin in the eclipse/plugins folder that also exists under the eclipse folder pointed at be the .eclipseextension eclipse seems to go through and verify it isn’t already loaded and if it is it writes to the error log.

Still trying to learn how the loading mechanism works…

49 Renato Brazioli 09.29.07 at 6:16 pm

It works fine on Mac OS X 10.4

Thanks!

R.

50 Avinash 10.19.07 at 3:37 pm

Nice article Venu

51 Kamal 10.30.07 at 11:25 am

When I try to add subclipse 1.2.4 as an extension through Manual Installation, (Subclipse->eclipse->has plugin and features folders); it says there must be a .eclipseextension file which is not there. Do we have to create it by ourselves?

But when I followed the links path, it works fine.

52 awaka 11.06.07 at 7:42 pm

Hi,
Thank you for your article.
I’m trying to create a links folder with link files inside for an exported RCP application (I export my application with the eclipse wizard and then I create manually the folders).
It seems it doesn’t work…
Have you already tried to do that?
Thank you very much.

53 Romain 02.26.08 at 8:51 pm

Thank you very much for this article. Very useful.

Interestingly, I discovered in the Eclipse 3.3 sources that you can prepend the actual path in the .link files with “r ” or “rw ” to create read-only or read/write (default) sites, as in:

path=r

Hope this helps

54 Romain 02.26.08 at 8:53 pm

“Greater than” and “lesser than” signs were removed. The syntax is:

path=r /path/to/…

55 Rama 03.10.08 at 9:47 am

I am unable to install for some reason. I was trying to install Hibernate Tools. Am I missing something here. I have eclipse 3.3.2 installed on my machine. Do I have install something more or am I missing something here??

56 venukb 04.02.08 at 8:34 pm

@Kamal,
Yes if you are using the extensions mechanism you should refer to this post

http://blog.exis.com/colin/archives/2004/12/23/managing-plugins-in-eclipse/

@Romain,
Thanks very much for that input. Will update the article with this info.

@Rama,
What is the error that you see ?

57 Octavius 05.10.08 at 10:37 pm

About the JSEclipse plug-in I tried the method described here to load it from a third party plug-ins folder and the first time the plug-in loaded just fine. After a workbench restart I saw the plug-in didn’t load at all and went to the config manager just to see that the plug-in was disabled.
What I did next was enable it and restarted the workbech once again to what it was disabled again. I repeated the process but instead of restarting the workbench I just applied the changes without any restart and the plug-in is working just fine.
Any ideas why this happens? Does JSEclipse conflicts with any other feature?
Hope this might help a bit.
Nice article by the way.

58 Getting Started with OSGi — Online Diary 05.21.08 at 12:14 am

[...] of Eclipse 3.0, the runtime is fully based on the OSGi notion of bundle (equivalent to Eclipse plug-ins). Also there are 4 open source implementations of OSGi R4 core framework specification available [...]

59 Mohammad 06.06.08 at 9:15 pm

Very good way and it worked with me well.
But what if I copied whole the eclipse root directory to another location (by a flash memory or shared it on a network) I guess that we have to:
(1). All plug-ins must be copied
(2). Strings 0f the corresponding link files (in the link folder) must be changed according to the corresponding plug-in new position.
Am I right?

60 Venu 06.07.08 at 1:17 pm

Octavius,
Apologies for the late reply. Regarding JSEclipse even Kevin also had a similar trouble.
So I went ahead and tried installing JSEclipse using Links. When I fired up eclipse, saw a message in the Error log saying “could not find feature.xml”.
I am out of touch with eclipse from some time, but for some reason, eclipse could not find the feature.xml which was in the archive (feature jar file). I extracted the contents and deleted the archive and restarted eclipse, seemed to work fine !

Try it and let me know if it worked for you.

Mohammad,
Even if you move the entire eclipse directory, there is nothing to be done since the links point to the same external directories. Note that you should ideally keep the extension folders out of Eclipse directory !

If you do rename or move the link folders themselves, as you have pointed out you need to update the string.

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>