Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Problem with user libraries
Problem with user libraries [message #251417] Thu, 14 February 2008 14:55 Go to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------070808050702040309000105
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

I created a user library and added a bunch of jars, all
of them from the same directory: let's call it dir/lib.
Right after adding everything looks good but if I close
the dialog and come back to it later I see that some of the
jars are called "foo.jar - dir/lib" but others "bar.jar -
\dir\lib" in the tree. The latter also have have a problem
marker on their icon (see attached snapshot: good one on
top, bad one underneath) and of course the project won't
compile.

What is the issue here? Remember: all the jars come from
the same physical directory and were added together. In
cases like that I think the GUI should offer some hints
as to what the problem is.

Thanks a lot for any leads.

-- O.L.

--------------070808050702040309000105
Content-Type: image/png;
name="jar_icons.png"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="jar_icons.png"

iVBORw0KGgoAAAANSUhEUgAAACcAAAAkCAIAAACFVbTMAAAACXBIWXMAAA7E AAAOxAGVKw4b
AAAAB3RJTUUH2AIOEzQyxTuv7wAAAAd0RVh0QXV0aG9yAKmuzEgAAAAMdEVY dERlc2NyaXB0
aW9uABMJISMAAAAKdEVYdENvcHlyaWdodACsD8w6AAAADnRFWHRDcmVhdGlv biB0aW1lADX3
DwkAAAAJdEVYdFNvZnR3YXJlAF1w/zoAAAALdEVYdERpc2NsYWltZXIAt8C0 jwAAAAh0RVh0
V2FybmluZwDAG+aHAAAAB3RFWHRTb3VyY2UA9f+D6wAAAAh0RVh0Q29tbWVu dAD2zJa/AAAA
BnRFWHRUaXRsZQCo7tInAAABAElEQVR4nO2VX0hTcRTHz7m729xkMqZtkRr2 oi9qFASSFL2E
CNVD9NKLIFS+9BDUq+nwLXqQiKTyqbAeiqCETLEIm2B/NRPKYJqblnPTrcbd 3e69v9/p4UIt
75wzNh/K78OP+zv3HD6c378vEhFsuoTNR2ajer3ewlExLys8PnguMjtgjJft at7T1J2hgNZQ
Z2fnWr+MGuqp5izKUwEWH9eWB7Vvt9W5btXfNdRTnTE/b70GJx8RAAIQAhIQ ACDsrDuWsVcx
fZJlLzs6OrJQnbUX7/mbTx9vLC2x2Mwoq3z5h3rzwWh97b7MBbmsavbV9k3M Xu7zBcKJyHc5
nkjKqVQ8kQp/+umbpgAAAQBJREFUlwPhxOU+n29i1liy5hlGxCzNpcsfjFR4 XIggCCgKaDGh
KIAJUUCo8Lj8wYixJA/3NRiKuV0OImAcGCeFkcaBETACt8sRDMVyoiKi3uiv D136rqePupZW
pBKHXWWgaCSrJCuUVEnRSGNU4rAvrUhGhGgM6acacfXx1g9U+qgrnkiZzaKi MQCBcQGROIHG
uMLIbBbjiVRO1I3KYbdKclKw24hIZQwRgEDjxDiX5KTDbt0ANfd77HYVy1LU XmTlRMgQUC8m
IpClqNtVvD71L57fSo9TlUKucouk2FQyExcAuFlQHdbkohSq9DiNJXl4m0bf f5ma/nyq2a0w
k8JEToIgcHuYCwkAAAEASURBVItJswisd2Cptqa6cXdVrlSv15v9PVoF7h/5 YDMjIgEQABKh
rNLRg3VGZDZqQbXl6hvVlqv/y64e3nxXFxBMiDZ5JjTctXmuzgkYwXz/fghf jb66UUBXxzOD
bddffKKSK1PRlqH5bReeJxfBJCrKTHsBXd0T8D0M/E7wACy0jZUPNxRtB+tM 748drQVx9cUn
XbuvtaZHzr69dDcGzlJL5Gm7erKlUK7+MbyYPnWLpuUTY0XDDQBQNncrbD+c f1cfOX9o2Bi9
05a0QJETAo/b1eb6jK7+BzV3Q9UlfV2o3FuzKhh8N61dGCu+3wAA9Tg5U3lk HWq6cnF1JRbz
P3tpjL/9GtGBAAAAFUlEQVR+M92kJ8RDjQeqjAn/k6v/BJ7sUyhcQUDlAAAA AElFTkSuQmCC

--------------070808050702040309000105--
Re: Problem with user libraries [message #251420 is a reply to message #251417] Thu, 14 February 2008 14:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Olivier Lefevre" <lefevrol@yahoo.com> wrote in message
news:fp26bd$oun$1@build.eclipse.org...
>I created a user library and added a bunch of jars, all
> of them from the same directory: let's call it dir/lib.
> Right after adding everything looks good but if I close
> the dialog and come back to it later I see that some of the
> jars are called "foo.jar - dir/lib" but others "bar.jar -
> \dir\lib" in the tree. The latter also have have a problem
> marker on their icon (see attached snapshot: good one on
> top, bad one underneath) and of course the project won't
> compile.
>
> What is the issue here? Remember: all the jars come from
> the same physical directory and were added together. In
> cases like that I think the GUI should offer some hints
> as to what the problem is.


It would help if you could specify what version of Eclipse you're using,
what operating system and JRE you're running on, and the precise steps you
took to add the files.

Is the problem reproducible? Is it reproducible in other projects or
workspaces? Does it always affect the same jars, or is it seemingly random?
Re: Problem with user libraries [message #251424 is a reply to message #251420] Thu, 14 February 2008 15:17 Go to previous messageGo to next message
Eclipse UserFriend
Walter Harley wrote:

> It would help if you could specify what version of Eclipse you're using,

3.4M5

> what operating system and JRE you're running on

Windows XP SP2, Sun JRE 1.6

> and the precise steps you took to add the files.

The help files list only one way to create user libraries: Preferences ->
Java -> Build Path -> User Libraries -> [pick one] -> Add Jars.

> Is the problem reproducible? Is it reproducible in other projects or
> workspaces? Does it always affect the same jars, or is it seemingly random?

Yes it is reproducible. I am only doing this one project in Eclipse,
so I can't say about other projects; the dir/lin in question is relative
to the project root, by the way. And yes it always affect the same jars
but I can't find anything special about them; I even tried renaming them,
to no avail.

Anyway, you did not comment on the information I _did_ provide: I uploaded
a snapshot of the "wrong jar" icon. What does that icon mean? And what do
those paths with a leading slash represent? The section about User
Libraries in the online Help is almost empty and does not shed any light on
this.

-- O.L.
Re: Problem with user libraries [message #251436 is a reply to message #251417] Fri, 15 February 2008 06:46 Go to previous messageGo to next message
Eclipse UserFriend
Olivier Lefevre wrote:
> I created a user library and added a bunch of jars, all
> of them from the same directory: let's call it dir/lib.
> Right after adding everything looks good but if I close
> the dialog and come back to it later I see that some of the
> jars are called "foo.jar - dir/lib" but others "bar.jar -
> \dir\lib" in the tree. The latter also have have a problem
> marker on their icon (see attached snapshot: good one on
> top, bad one underneath) and of course the project won't
> compile.
>
> What is the issue here?
No issue at all. The stuff on the lower left corner of the JAR icon
indicates that it is taken from an external location while the other
(just white) JAR indicates that this JAR is (somewhere) inside your
workspace.

Dani
> Remember: all the jars come from
> the same physical directory and were added together. In
> cases like that I think the GUI should offer some hints
> as to what the problem is.
>
> Thanks a lot for any leads.
>
> -- O.L.
>
> ------------------------------------------------------------ ------------
>
Re: Problem with user libraries [message #251478 is a reply to message #251436] Mon, 18 February 2008 01:08 Go to previous messageGo to next message
Eclipse UserFriend
>> What is the issue here?
> No issue at all. The stuff on the lower left corner of the JAR icon
> indicates that it is taken from an external location while the other
> (just white) JAR indicates that this JAR is (somewhere) inside your
> workspace.

I think there is still an issue because they come from the exact same
place and were added in the same way, so there no reason why some should
be treated differently.

-- O.L.
Re: Problem with user libraries [message #251496 is a reply to message #251478] Mon, 18 February 2008 05:43 Go to previous messageGo to next message
Eclipse UserFriend
Olivier Lefevre wrote:
>>> What is the issue here?
>> No issue at all. The stuff on the lower left corner of the JAR icon
>> indicates that it is taken from an external location while the other
>> (just white) JAR indicates that this JAR is (somewhere) inside your
>> workspace.
>
> I think there is still an issue because they come from the exact same
> place and were added in the same way, so there no reason why some should
> be treated differently.
I assume that the JAR file with no books on the left is part of a
project and hence it gets rendered as being inside your workspace while
the other is external. If that's not the case then please file a bug
report with steps to reproduce against JDT UI.

Dani
>
> -- O.L.
Re: Problem with user libraries [message #251508 is a reply to message #251496] Mon, 18 February 2008 21:35 Go to previous messageGo to next message
Eclipse UserFriend
> I assume that the JAR file with no books on the left is part of a
> project and hence it gets rendered as being inside your workspace while
> the other is external.

What do you mean by no books on the left? If you mean no icon, all jars do
have an icon to the left but in some the icon is overlaid in the lower left
corner by something I can't identify. I have posted the icons before.

> If that's not the case then please file a bug report with steps to reproduce against JDT UI.

That is often a rather futile attempt, as many bugs are heisenbugs that
disappear as soon as you try to create a simpler test case and I can't very
well upload my whole project to Bugzilla. It would be more useful to have
facilities for tracing and debugging *in the field* what happens in such cases.

Thanks,

-- O.L.
Re: Problem with user libraries [message #251512 is a reply to message #251508] Tue, 19 February 2008 02:37 Go to previous messageGo to next message
Eclipse UserFriend
Olivier Lefevre wrote:
>> I assume that the JAR file with no books on the left is part of a
>> project and hence it gets rendered as being inside your workspace
>> while the other is external.
>
> What do you mean by no books on the left? If you mean no icon, all
> jars do have an icon to the left but in some the icon is overlaid in
> the lower left corner by something I can't identify. I have posted the
> icons before.
The stuff you can't identify should look like books / library.
>
>> If that's not the case then please file a bug report with steps to
>> reproduce against JDT UI.
>
> That is often a rather futile attempt, as many bugs are heisenbugs
> that disappear as soon as you try to create a simpler test case and I
> can't very well upload my whole project to Bugzilla. It would be more
> useful to have facilities for tracing and debugging *in the field*
> what happens in such cases.
>
> Thanks,
>
> -- O.L.
Re: Problem with user libraries [message #251527 is a reply to message #251508] Tue, 19 February 2008 13:15 Go to previous message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Olivier Lefevre" <lefevrol@yahoo.com> wrote in message
news:fpdf91$oeg$1@build.eclipse.org...
> That is often a rather futile attempt, as many bugs are heisenbugs that
> disappear as soon as you try to create a simpler test case and I can't
> very well upload my whole project to Bugzilla. It would be more useful to
> have facilities for tracing and debugging *in the field* what happens in
> such cases.

The fact that it is sometimes futile for a person reporting a bug to try
narrowing it down, doesn't mean it is always impossible or that you should
not try. Sometimes in the course of trying, you discover what the
underlying problem was and how to fix it yourself.

In practice, it turns out to be at least as hard to provide tracing and
debugging for all possible failures and confusions, as it is to narrow down
problems when they do happen. It is particularly hard to do that and still
preserve maintainable code and good performance. It is easy, after a
problem happens, to say "there should have been a tracing option for that",
but when the code is written there is no way to know that is where the
problem is going to happen or what sort of problem it is going to be.

If you look through the various debug tracing options for JDT you'll see
that there are quite a lot already. Perhaps there is an existing option
that will help you.
Previous Topic:Please vote for custom code folding enhancement (user defined regions)
Next Topic:Converting between jdt.core.dom.* to .java
Goto Forum:
  


Current Time: Wed May 07 08:44:01 EDT 2025

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

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

Back to the top