Can an extra plugin directory be specified on command line - eclipse

With Eclipse 3.4, is it possible to provide an ADDITIONAL plugin directory from command line? Something like:
eclipse -plugin_dir D:/myproduct/V1.1/plugins -clean
This is just to save copying of plugins everytime.
While copying can be done with script, it's possible that user may not have
write permissions to system install eclipse.
Follow up:
The solution given by #VonC is for reusing same plugins in multiple Eclipses.
I'm looking for a to use Multiple versions of plugins with Same Eclipse.
( If user has Version 1.1 and Vesion 1.2 of my plugin installed )
Resolved:
The directory pointed to by -Dorg.eclipse.equinox.p2.reconciler.dropins.directory
should end with a directory named 'eclipse'
Inside this eclipse where should be directory called plugins,
place all the jars at in the plugins directory
create a launcher , which launch eclipse with additional command line:
-vmargs
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=AbsolutePath\eclipse
One may want to add -clean also ..

As mentionned in Installing Eclipse (3.4+) plugins in a directory other than ECLIPSE_HOME/plugins, the right way is to define a bundle pools (also introduced here)
See my previous answer for more details.

It space is not a big issue, users can copy the system install of eclipse into a work directory and put additional plugins/features in the dropins/ directory.

Related

Moving eclipse installation directory causes problems

I've recently re-organised my Eclipse installation directories, to cater for various flavours of Eclipse (Helios, Indigo, Juno), but then this caused a problem as the ".eclipse" directory (that lives in my home directory) has sub folders that identify the eclipse version but end with a suffix that I think identifies the install directory
for example: org.eclipse.platform_3.6.1_12345678
So with changing the Eclipse install directory, and then booting up Eclipse, a new subfolder was created and the knowledge of my plugins installed is lost.
Why does Eclipse do this ? And how can I manage Eclipse such that I can tie the 2 directories together so I am free to move installation folder without breaking anything?
Is there any good practices of managing multiple Eclipse installations, with respect to configuration ( plugins ), and workspaces ?
By default, eclipse always stores its local configuration in the user's home .eclipse folder. You can override the default though.
In the eclipse.ini file for each of your different versions, you can add the following JVM parameter (make sure you add this line below the -vmargs line)
-Dosgi.configuration.area=#user.home/.eclipse<version>
where
<version>
is whatever identifier you choose for that particular version of eclipse.
This should help keep the different configurations separate and prevent them from stomping on each other.
Hope this helps.

How to manually install software/plugin to Eclipse IDE?

I have downloaded a RAR file from the following location, to be (manually) installed to Eclipse (Helios). How can I perform the manual installation?
http://sourceforge.net/projects/eclipsesql/files/SQL%20Explorer%20RCP%20%28exc%20JRE%29/3.6.1/sqlexplorer_rcp-3.6.1.macosx.cocoa.x86.tgz/download
Instead of putting it directly into the plugins directory, it's better to use the dropins directory as this was created just for this purpose. Have a look here: http://wiki.eclipse.org/Equinox_p2_Getting_Started#Dropins
For sqlexplorer: do not download the full RCP version (as your link does), this one is standalone. Get this one instead: http://sourceforge.net/projects/eclipsesql/files/SQL%20Explorer%20Plugin/3.6.1/sqlexplorer_plugin-3.6.1_SR2.zip/download
Extract this to $eclipse_home$\dropins\sqlexplorer and restart Eclipse.
BUT: Using the SqlExplorer Update Site (http://eclipsesql.sourceforge.net/) would be an even better option (Help>Install new Software)
I have tried the installation with the explanation about the dropins folder and had to tweak it like that:
Unzip the distribution into your eclipse installation directory under the folder dropins. Your structure should be:
eclipse/
dropins/
eclipse/
features/
plugins/
Remove all other files and directories. There is some missing piece (file contents.xml), so that the distribution is no real p2 repository which leads to an error. The directories plugins and features are sufficient.
Restart your eclipse (I have done it with option -clean, not sure if that is necessary).
SQLExplorer is then installed and visible in the help, in different menus and with a new perspective.
I even was able to use it to have a look at my SQLite3 database of a rails3 application. Wow!! So I will give it a try.
From their website (http://www.sqlexplorer.org/):
Eclipse Plugin
Download
Download the Eclipse SQL Explorer plugin and extract the zip file in your eclipse directory (requires Eclipse 3.3 or better).
After restarting eclipse with the -clean option, a new SQL Explorer perspective should be available.
Eclipse Update Site
You can install and update Eclipse SQL Explorer via the eclipse update mechanism. The update site for Eclipse SQL Explorer is http://eclipsesql.sourceforge.net/
I always go for the update site option if they present it, it's easier and lets you do updates easily. To use the update mechanism just select Help > Insall New Software... then enter the update site, press Add and go through the wizard.

Manual Install of GWT 2.1.0 in Eclipse Helios 3.6.1

I am behind an intranet that does not have access to the download sites. Assuming I have access to all of the correct zip and jar files. What are the step by step instructions to get Eclipse to the point where I can go to Windows -> Preferences and see the Google entry?
1) I don't have access to the http://code.google.com/eclipse/docs/getting_started.html site because I am on a closed network.
2) I tried using the dropins folder and when I re-open Eclipse and go to Windows->Preferences "Google" isn't listed.
Any ideas?
The official zip-file installation instructions are at http://code.google.com/eclipse/docs/install-from-zip.html
This uses the Eclipse dropins mechanism, which helps Eclipse to pick up the new plugins in a clean way, quote:
... the dropins folder can be used much like the plugins directory was used in the past. A subtle twist on old behavior here is that plug-ins and features added to the dropins folder are properly installed into the system rather than being forced in.
Note:
Make sure, that you extract the zip file into the correct destination. It can easily happen, that it gets extracted e.g. into some subdirectory - so please check twice. You should have the following structure:
eclipse (this is your Eclipse installation folder)
dropins
eclipse (this is the directory created by extracting the zip file)
features
com.google.*
plugins
com.google.*
features
(your already installed features)
plugins
(your already installed plugins)
...
Then (re-)start Eclipse.
Just install the plugin from here and you are set to go.
http://code.google.com/eclipse/docs/getting_started.html
If you get a correct zip file for plugin, you will see "plugins" and "features" as soon as you open the zip file.
If your eclipse is in a location "c:\eclipse", extract the zip file into "c:\eclipse". The files will go into the corresponding folders.
Drop them in the plugins folder

Eclipse doesn't load plugins in the dropins folder

I just downloaded Eclipse SDK 3.5.1 and want to install some add ons such as GEF, EMF, etc.
I downloaded all the zip files for everything I needed and decided to install them in the dropins folder. I read http://wiki.eclipse.org/Equinox_p2_Getting_Started and structured my dropin folder as specified:
eclipse/
dropins/
emf/
eclipse/
features/
plugins/
gef/
eclipse/
features/
plugins/
... etc ...
When I start up Eclipse it does not recognize any of the features or plugins I have put into the structure above. Any ideas?
This is probably a bit late to help you, but maybe it will help somebody else. I had a similar problem, so I posted a question to the Eclipse Community Forums asking about how to get a report about missing dependencies. Mickael Istria's helpful reply is shown below for those who aren't members of that forum:
You can start or diag the OSGi Console and try to start the bundle manually. The console will print you some warnings. See http://eclipse.org/equinox/documents/quickstart.php and for more details.
shell> eclipse -console
[...Eclipse starts up...]
osgi> diag your.unresolved.bundle
[...shows you unresolved constraints...]
In my case, I tried several directory structures that I thought should work, before I found one that did:
dropins/
myPlugin
plugins/
depPluginDir1/*
depPluginDir2/*
Coming back years later to solve a similar problem..., I found the following web pages to be helpful: Where is My Bundle, Plug-ins are not picked up from the dropins/ folder.
First of all, run eclipse with -clean to ensure p2 fully rescans the dropins directory and sees your plugins.
If it still doesn't load you can use p2 debugging to see what the problem is also. For some strange reason p2 doesn't log dropins issues unless you explicitly turn it on with the following steps:
Create an .options file in the eclipse folder where you start up Eclipse with the following content:
org.eclipse.equinox.p2.core/debug=true
org.eclipse.equinox.p2.core/reconciler=true
Then run eclipse with the following arguments (last argument is the path to the .options file you just created):
eclipse -clean -console -consoleLog -debug /path/to/.options
PS, I have created this bugzilla to request it be turned on as a default. You can vote/track making this logging the default there.
PPS, #kc2001's suggestion is a good one also once you have narrowed down on what plugin has the issue and you want to troubleshoot it more.
Some relevant links:
http://wiki.eclipse.org/Equinox_p2_Getting_Started
http://www.eclipse.org/forums/index.php/m/116635/
http://www-01.ibm.com/support/docview.wss?uid=swg21428463
I suggest that you try to install those features via the update manager. EMF and GEF are standard features from Eclipse.org, there's no reason not to install them in Eclipse's main p2 repository folder (it is easy to uninstall them, in case that is your concern).
Have a look at the error log view (Window -> Show View -> Error Log) to see why they didn't load. My guess is that they are missing a dependency, but without more information it is difficult to answer your question. I also suggest looking at Help -> About Eclipse -> Installation Details to see what exactly is installed.
Something that has just solved this very same issue for me: start eclipse with the command line parameters -clean -console -consoleLog. The weird thing: with -clean -console, it didn't work. Only after I added -consoleLog, the bundles were recognized.
This ended up being an issue with Eclipse for me. Placing the plugin jar in each of the folders suggested, running as admin, etc. didn't work.
What did solve it was downgrading from a Juno package to Indigo. You can find older versions of Eclipse here.
The local archive plug-ins work if you have downloaded an update site plug-in. In that case the dropins might not work.
About the dropin structure, it always worked for me, but I never use the eclipse folder inside my own ones, only the plugins and features. Did you extract the zip file to that structure?
If yes, it should be worth checking the Error log after Eclipse started, there might be some unresolved dependecies listed.
Don't place the zip files manually like that.
Use the wizard within Eclipse to install a local archive plug-in.

Installing a plain plugin jar in Eclipse 3.5

Since Eclipse 3.5 there seems to be no option to have drop a plugin jar ( not a feature ) in the Eclipse base directory and have it picked up at next startup.
Is there any possiblity to have plain plugins jars installed in Eclipse 3.5?
Since the advent of p2, you should be using the dropins directory instead.
To be completely clear create "plugins" under "/dropins"
and make sure to restart eclipse with the "-clean" option.
Simplest way - just put in the Eclipse plugins folder. You can start Eclipse with the -clean option to make sure Eclipse cleans its' plugins cache and sees the new plugin.
In general, it is far more recommended to install plugins using proper update sites.
For Eclipse Mars (I've just verified that) you to do this (assuming that C:\eclipseMarsEE is root folder of your Eclipse):
Add plugins folder to C:\eclipseMarsEE\dropins so that it looks like:
C:\eclipseMarsEE\dropins\plugins
Then add plugin you want to install into that folder:
C:\eclipseMarsEE\dropins\plugins\someplugin.jar
Start Eclipse with clean option.
If you are using shortcut on desktop then just right click on Eclipse
icon > Properties and in Target
field add: -clean like this: C:\eclipseMarsEE\eclipse.exe -clean
Start Eclipse and verify that your plugin works.
Remove -clean option from Target field.
go to Help -> Install New Software... -> Add -> Archive.... Done.
in Eclipse 4.4.1
copy jar in "C:\eclipse\plugins"
edit file "C:\eclipse\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info"
add jar info.
example:
com.soft4soft.resort.jdt,2.4.4,file:plugins\com.soft4soft.resort.jdt_2.4.4.jar,4,false
restart Eclipse.
This is how you can go about it:
Close Eclipse
Download a jar plugin (let's assume its testNG.jar)
Copy testNG.jar to a certain folder (say C:\Project\resources\plugins)
In your Eclipse installation folder, there is a folder named dropins (could be C:\eclipse\dropins), create a .link file in that folder, (like plugins.link)
Open this file with any text editor and enter this one line:
path=C:/Project/resources/plugins
Save the file and start Eclipse.
And you are good to go!
Please do not forget to change your backward slashes in your plugins folder path to forward slashes on step 5. I used to forget and it would take my time unnecessarily.