Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » .eclipse folder issues
.eclipse folder issues [message #635423] Tue, 26 October 2010 17:55 Go to next message
Matthew Dickie is currently offline Matthew Dickie
Messages: 56
Registered: July 2009
Member
Hi all,


We have had a number of occasions where after fixing a bug in one of our
plug-ins, this bug does not appear to be fixed when the user (or a
member of our staff) installs the fixed package. Somehow an old version
of the plugin is being used. Removing the .eclipse folder fixes this.

What is this folder for? How does Eclipse use it?

Further information: We have an Eclipse based IDE for our language. It
has a number of plugins, a feature and a product configuration file
which uses that feature as well as the features we require. We use an
NSIS based installer to install it, together with other tools.

Matt D.
Re: .eclipse folder issues [message #635580 is a reply to message #635423] Wed, 27 October 2010 12:14 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

When installed in multi-user mode, eclipse uses the $HOME/.eclipse
folder for user specific configurations (since they can't write into the
eclipse/configuration folder).

http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/misc/multi_user_installs.html

If they install a plugin, it will be managed in that folder. If you
upgrade or install something in the main install, I thought it was
supposed to be available to the users the next time they started up.

If that's not the case, I would open a bug at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Equinox& amp;component=p2
and post the number here.

If I have your usecase wrong, please provide some more details.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: .eclipse folder issues [message #635605 is a reply to message #635580] Wed, 27 October 2010 13:13 Go to previous messageGo to next message
Matthew Dickie is currently offline Matthew Dickie
Messages: 56
Registered: July 2009
Member
Hi Paul,

Yes, I see Eclipse uses multi-user mode when the installation folder is
read only. We have never thought about 'do we want a multi-user install
or not?', but on Windows we do install to a subdir of c:\Program Files\
by default, so based on that help article you posted a link to, on
Windows Vista/7 this would make the install a multi-user install by default.

The problem we have had is that when our NSIS based installer is used to
install a new version of our Eclipse-based IDE over the top of an old
one, occasionally the new behaviour is not observed (e.g. bug fixes,
changes to dialogs, etc). Deleting the .eclipse folder fixes this. It
seems as if somehow java class files have been cached here. A fix would
be for the installer to delete this folder, but this isn't really
pratical as there can be many users, and I don't really know what
information might be stored here and how important it may be.

So I suppose the question is, does java bytecode from the plugins get
cached here, and if so why? It forces us to ask our users to remove
their .eclipse folder when various strange problems occur.

Thanks in advance,

Matt D.


On 27/10/2010 13:17, Paul Webster wrote:
> When installed in multi-user mode, eclipse uses the $HOME/.eclipse
> folder for user specific configurations (since they can't write into the
> eclipse/configuration folder).
>
> http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/misc/multi_user_installs.html
>
>
> If they install a plugin, it will be managed in that folder. If you
> upgrade or install something in the main install, I thought it was
> supposed to be available to the users the next time they started up.
>
> If that's not the case, I would open a bug at
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Equinox& amp;component=p2
> and post the number here.
>
> If I have your usecase wrong, please provide some more details.
>
> PW
>
>
Re: .eclipse folder issues [message #635606 is a reply to message #635605] Wed, 27 October 2010 13:39 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Matthew Dickie wrote:
> Hi Paul,
>
> Yes, I see Eclipse uses multi-user mode when the installation folder is
> read only. We have never thought about 'do we want a multi-user install
> or not?', but on Windows we do install to a subdir of c:\Program Files\
> by default, so based on that help article you posted a link to, on
> Windows Vista/7 this would make the install a multi-user install by
> default.

well, yes, but as per that link to make it a proper multi-user install
the admin that installs it needs to run an -initialize command line on
it. That does the correct, complete setup.


> The problem we have had is that when our NSIS based installer is used to
> install a new version of our Eclipse-based IDE over the top of an old
> one,

Installing one eclipse on top of another won't work correctly. i.e.
it's pretty well guaranteed to fail, and I'm surprised it ever works for
anyone at all :-)

> occasionally the new behaviour is not observed (e.g. bug fixes,
> changes to dialogs, etc). Deleting the .eclipse folder fixes this.

In the case you've found, does running eclipse as the user with -clean
fix the problem?


> seems as if somehow java class files have been cached here. A fix would
> be for the installer to delete this folder, but this isn't really
> pratical as there can be many users, and I don't really know what
> information might be stored here and how important it may be.

If the user has installed an extra plugin, it will be in their own
..eclipse folder. Deleting it would wipe out information for any of the
eclipse installs they are using.


> So I suppose the question is, does java bytecode from the plugins get
> cached here, and if so why? It forces us to ask our users to remove
> their .eclipse folder when various strange problems occur.

This is most likely a symptom of installing over an old install.
Upgrading the install, or removing it and installing the new version,
would both be better options.

Or installing in versioned directories, and allowing the users to move
to the latest version. ex:

C:\Program Files\eclipse-3.5.1\
C:\Program Files\eclipse-3.6.0\
C:\Program Files\eclipse-3.6.1\

etc.


The eclipse p2 system is good at both creating a new install and
upgrading an existing one. It's what I use:

http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/p2_director.html


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: .eclipse folder issues [message #635653 is a reply to message #635606] Wed, 27 October 2010 14:59 Go to previous messageGo to next message
Matthew Dickie is currently offline Matthew Dickie
Messages: 56
Registered: July 2009
Member
Hi Paul

On 27/10/2010 14:39, Paul Webster wrote:
>> Hi Paul,
> well, yes, but as per that link to make it a proper multi-user install
> the admin that installs it needs to run an -initialize command line on
> it. That does the correct, complete setup.

Hmm. That link doesn't make that clear. It seems to suggest that this
allows you to create this configuration area early. I think we will not
bother doing this. Anyway, this is a side issue.

>> occasionally the new behaviour is not observed (e.g. bug fixes,
>> changes to dialogs, etc). Deleting the .eclipse folder fixes this.
>
> In the case you've found, does running eclipse as the user with -clean
> fix the problem?

Yes, that fixes it as well, and is the best way to fix it. I had
forgotten about this, as we didn't initially discover it.

> If the user has installed an extra plugin, it will be in their own
> .eclipse folder. Deleting it would wipe out information for any of the
> eclipse installs they are using.

Yes, so we should use -clean. But that doesn't answer my initial question:

>> So I suppose the question is, does java bytecode from the plugins get
>> cached here, and if so why? It forces us to ask our users to remove
>> their .eclipse folder when various strange problems occur.

> This is most likely a symptom of installing over an old install.
> Upgrading the install, or removing it and installing the new version,
> would both be better options.

We haven't actually had this problem for a while, and I can't remember
if it still occurs after uninstalling the old IDE and installing the new
version. My colleage, however, insists that this is the case, and
removing the .eclipse folder (or better using -clean) is required to fix
this. I

> The eclipse p2 system is good at both creating a new install and
> upgrading an existing one. It's what I use:
>
> http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/p2_director.html

Yes, I could allow users to update the IDE that way. However our IDE is
installed as part of a wider package, including compilers and runtime
libraries for our language as well as other tools, so the initial
problem remains.

When this issue next occurs, I will look into it more thoroughly, but in
the mean time I would be very grateful if you could answer my initial
question: does Eclipse cache plugins or parts of plugins (not extra
plugins, but installed plugins in the original install location within
the Program Files dir)? If so why, and how can we deal with it when the
user installs a new version (we can't run the IDE with the -clean for
every user on install)

Thanks for your help,

Matt D.
Re: .eclipse folder issues [message #635654 is a reply to message #635653] Wed, 27 October 2010 15:48 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Matthew Dickie wrote:
> Hi Paul
> Hmm. That link doesn't make that clear. It seems to suggest that this
> allows you to create this configuration area early. I think we will not
> bother doing this. Anyway, this is a side issue.

If you don't run it, then the main install config area is not configured
properly to be used in multi-user mode. That can cause interference
between your main install configuration and any configuration stored in
the users .eclipse folder.

As for installing over an old eclipse, we don't just recommend against
it but say "never do that". Once you do that, your install will be
broken. You've been lucky that your stuff has run at all (in most cases
it won't) and only caused some upgrade hiccups.

> When this issue next occurs, I will look into it more thoroughly, but in
> the mean time I would be very grateful if you could answer my initial
> question: does Eclipse cache plugins or parts of plugins (not extra
> plugins, but installed plugins in the original install location within
> the Program Files dir)? If so why, and how can we deal with it when the
> user installs a new version (we can't run the IDE with the -clean for
> every user on install)


It doesn't cache code there, but it does store other information. In
eclipse/configuration: Certain files that were requested "extracted"
from their plugins, like files or directories. The extension registry
cache (that's what -clean causes to be re-read, and is not a problem
when updated via p2 as p2 cleans the cache). bundles.info, which is a
pointer to specific plugins and their run levels. Other configuration
level (as opposed to workspace level) information (things like network
proxies, for example).

There's also the eclipse/p2 directory at the install level, which
contains pointers to bundles and other install/configuration type
metadata that is generated for a particular install.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Marker shows no Tooltip
Next Topic:How to contribute configurations programmatically
Goto Forum:
  


Current Time: Thu Sep 18 15:46:07 GMT 2014

Powered by FUDForum. Page generated in 0.04783 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software