|
|
Re: Classpath variable stored where? [message #288049 is a reply to message #288034] |
Mon, 11 July 2005 22:10 |
Eclipse User |
|
|
|
Originally posted by: eclipse3.rizzoweb.com
Gary Udstrand wrote:
> Where does eclipse store the classpath variables?
For Projects, the build classpath (as opposed to runtime classpath for
application launches) is stored in the .classpath file located in the
root directory of the Project.
For runtime classpath of launched applications, there are *.launch files
created that probably include the classpath. I don't remember off the
top of my head where they are stored by default, but if you configure
them as "Shared" then you can pick any location in your workspace to
store them in.
HTH,
Eric
|
|
|
Re: Classpath variable stored where? [message #296365 is a reply to message #288049] |
Wed, 21 December 2005 13:07 |
Eclipse User |
|
|
|
Originally posted by: thunderaxiom.gmail.com
Eric Rizzo wrote:
> Gary Udstrand wrote:
>
>> Where does eclipse store the classpath variables?
>
>
> For Projects, the build classpath (as opposed to runtime classpath for
> application launches) is stored in the .classpath file located in the
> root directory of the Project.
Do you happen to know where the defintion of a variable (like
MAVEN_REPO) is stored?
I tried looking for it, and couldn't find it.
(Eclipse 3.1 under XP).
--
Thorbjørn
|
|
|
Re: Classpath variable stored where? [message #296366 is a reply to message #296365] |
Wed, 21 December 2005 13:45 |
Eclipse User |
|
|
|
Originally posted by: automatic.javalobby.org
Normally, when you're using Maven and Eclipse, you set up a variable in Eclipse using Preferences -> Java -> Classpath Variables (or Build Path -> Classpath Variables, depending on your Eclipse version). Then you set up the location of your maven repository there.
There's no way to access the contents of MAVEN_REPO directly (thanks to those brilliant people at Sun who modified System.getEnv() to throw an Error) so you have to define it in two places.
On the plus side, you can define any external references to your project in the build paths by 'extending' the MAVEN_REPO variable to point to the specific Jar you want under the repository tree. If you then need to move/use a different repository, you can simply update the classpath variable and recompile.
However, if you've not put it there then don't expect MAVEN_REPO to be there -- you have to put it there yourself first.
Alex.
|
|
|
Re: Classpath variable stored where? [message #296573 is a reply to message #296366] |
Tue, 27 December 2005 12:50 |
Eclipse User |
|
|
|
Originally posted by: thunderaxiom.gmail.com
Alex Blewitt wrote:
> Normally, when you're using Maven and Eclipse, you set up a variable in Eclipse using Preferences -> Java -> Classpath Variables (or Build Path -> Classpath Variables, depending on your Eclipse version). Then you set up the location of your maven repository there.
Perhaps I was not clear enough in saying that I was wanting to know
where Eclipse stores the classpath variable definitions. I cannot
localize the file containing the defintions by searching for MAVEN_REPO
in either the workspace or the eclipse installation tree (and yes, it is
defined :) ), so I was wondering if somebody else knew this.
Thanks in advance.
Thorbjørn
|
|
|
Re: Classpath variable stored where? [message #296589 is a reply to message #296573] |
Tue, 27 December 2005 19:16 |
Eclipse User |
|
|
|
Originally posted by: automatic.javalobby.org
If you're asking where Eclipse stores the values you put in the classpath preferences page, then it's under the .metadata directory, probably in the plugins/org.eclipse.jdt.core/settings.xml (or something like that).
If you're askign where Eclipse stores the values on a per-project basis, the answer is in the .classpath file. This contains entries either of the form 'lib' or 'var', in which case, the first part of the path is treated as a variable defined in the Eclipse preferences dialog.
Hope either of those answers are the ones you're looking for.
Alex.
|
|
|
Re: Classpath variable stored where? [message #296624 is a reply to message #296589] |
Wed, 28 December 2005 13:02 |
Eclipse User |
|
|
|
Originally posted by: thunderaxiom.gmail.com
Alex Blewitt wrote:
> If you're asking where Eclipse stores the values you put in the classpath preferences page, then it's under the .metadata directory, probably in the plugins/org.eclipse.jdt.core/settings.xml (or something like that).
This is the one I am looking for. It appears to be stored in
variablesAndContainers.dat (whee) which is a binary file (sigh).
Is there anybody who knows whether there is any particular reason that
this is not an XML file?
--
Thorbjørn
|
|
|
Re: Classpath variable stored where? [message #296640 is a reply to message #296624] |
Wed, 28 December 2005 22:12 |
Eclipse User |
|
|
|
Originally posted by: automatic.javalobby.org
Probably because it was implemented in an agile manner; that is, get something that works quickly. It's being proposed to change it during the 3.2 lifecycle:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=103839
It might be being stored as a Zip file or a compressed file (but if that were the case, I'd be surprised that you could find it by search alone). Try changing the extension to '.jar', '.zip', '.gz' and opening it in WinZip to see if it recognises it as a compressed file. It may be that there's one (or more) files stored in the .dat file, and it's being used as a pseudo container.
Can't answer why it is implemented the way that it is though.
Alex.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03542 seconds