This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 146877 - [65cat] Resolve Reference Problems accepts any file to get resolved
Summary: [65cat] Resolve Reference Problems accepts any file to get resolved
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: David Konecny
Depends on:
Reported: 2008-09-11 05:58 UTC by sunbiz
Modified: 2015-04-13 20:29 UTC (History)
0 users

See Also:
Exception Reporter:

C:\Program Files\NetBeans 8.0.2\bin (707 bytes, patch)
2015-04-13 20:26 UTC, zaman-1
Details | Diff
C:\Program Files\NetBeans 8.0.2\bin (707 bytes, patch)
2015-04-13 20:29 UTC, zaman-1
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sunbiz 2008-09-11 05:58:17 UTC
[ BUILD # : 200809091401 ]
[ JDK VERSION : other ]

Product Version: NetBeans IDE Dev (Build 200809091401)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b15
System: Windows Vista version 6.0 running on x86; Cp1252; en_IN (nb)

Steps to reproduce:
1.) Create new Web project
2.) Right-click -> Properties -> Libraries -> Add jar for say C:
\mail.jar and C:\activation.jar and press OK
3.) Close the project in netbeans
4.) delete the libraries from C:\
5.) Open the project in netbeans... This will ask to resolve 
reference problems
6.) Right-click on project and select Resolve Reference Problems
7.) Click Resolve button on 1st item activation.jar
8.) Browse dialog opens and select any folder and press OK. It will 
say that the problem is resolved, but actually activation.jar has not

been found in the selected folder. This is incorrect behavior. Until

the same library is not found, the problem should not be resolved.
Comment 1 Milos Kleint 2008-09-11 09:10:44 UTC
reassigning to web.
in my opinion the behaviour is correct, both jars and folders are classpath roots. if you select folder, well you
probably have the activation.jar classes in a folder structure rather than a jar file. up to the user to decide.
Comment 2 sunbiz 2008-09-11 11:26:38 UTC
OK...let me restate what the issue is... when I select any random folder (which does not contain the libraries/jar, 
which are actual references), even then netbeans thinks that the references are resolved, which in context of a project 
can be very dangerous. This is not just a web project issue, but for all kinds of projects... So should be reassigned 
to "projects"
Comment 3 David Konecny 2008-09-12 01:02:34 UTC
The problem is that when a reference is broken all what's known about the reference is its name which in theory can be
anything as well. It is difficult to give any guidance to user what to chose. Classpath item can be jar or folder with
classes. Similarly you could argue that broken reference to activation.jar can be resolved to jakarta-commons-lang.jar
and IDE will let user do that.

Hopefully with sharable libraries feature (since NB6.1) this problem should not be that common - your references just
will not get broken. Also as you may know you can always go to project's properties to libraries panel and fix classpath
there if you resolved something wrongly. That reminds me that we have long term plan to get rid of "Resolve Broken
References" dialog completely and merge the feature with Libraries panel in project properties - you would resolve
broken references directly there.
Comment 4 zaman-1 2015-04-13 20:26:46 UTC
Created attachment 153175 [details]
C:\Program Files\NetBeans 8.0.2\bin
Comment 5 zaman-1 2015-04-13 20:29:57 UTC
Created attachment 153176 [details]
C:\Program Files\NetBeans 8.0.2\bin