Bug 12797 - Can't add directory pointing to class-files to project classpath
Summary: Can't add directory pointing to class-files to project classpath
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-04 10:37 EST by Bjørn Ebbesen CLA
Modified: 2003-02-14 10:47 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bjørn Ebbesen CLA 2002-04-04 10:37:31 EST
Version: 2.0 
Build: 20020321
project - context-menu - properties - JavaBuildPath
Where ever here I was trying to add a directory pointing to my class-files, it 
was not possible or these class-files were not accessible from workbench.
But when I jar all my class-files I can add this jar and this works.
Comment 1 Philipe Mulet CLA 2002-04-08 07:19:42 EDT
Currently only CLASS file folder located inside the workspace are supported. 
The rational for this is that Eclipse only tracks down changes inside the 
workspace. Therefore, any change to one of these CLASS file (if it lived 
outside the workspace) would never be detected properly.

Do you confirm your CLASS file folder was located outside your workspace ?
Also note that you could define a project in this external area (by changing 
its default location), and have your CLASS folder be located inside this semi-
external project. Would this work for you ?
Comment 2 Bjørn Ebbesen CLA 2002-04-09 06:17:40 EDT
I confirm that my CLASS file folder was located outside my workspace.

When I use a "semi external" project for my external class files instead of 
folders to add to my BuildPath I have additional effort adding all necessary 
jars ... in this "semi external" project for these external CLASS files to 
avoid hundreds of errors indicated.

It would be really nice to have in my BuildPath the possibility to 
use "external CLASS files folders" as it is now possible to use "external JAR-
Folders" - as expressed by "external" any change to one of these JAR (or 
CLASS) file would never be detected properly.
Comment 3 Philipe Mulet CLA 2002-04-09 10:32:07 EDT
Did you consider using symlinks instead ? See for example: junctions
http://www.sysinternals.com/ntw2k/source/misc.shtml#junction.

I guess currently you can access outside classfile folders through classpath 
variables, but this isn't really supposed to work.
Comment 4 Bjørn Ebbesen CLA 2002-04-09 10:51:29 EDT
Sorry, maybe I've misunderstood your comment, but that's the problem:

I can't access outside classfile folders through workbench or external managed 
classpath variables or even symlink, because I can't add a path to the 
JavaBuildPath to outside classfile folders. Whenever I try to add such a path, 
the workbench expects to find outside JAR files out there instead of my 
outside classfile folders.
Comment 5 Philipe Mulet CLA 2002-04-09 11:36:04 EDT
If you add a symlink 'classfiles' targetting your external classfiles folder, 
then you should be able to target the symlink using 'add folder' on the Library 
tab of the buildpath wizard.

Comment 6 Bjørn Ebbesen CLA 2002-04-10 08:03:00 EDT
1. Just tried - symlink doesn't work on my machine (Windows XP)
2. 'add folder' on the Library tab of the buildpath wizard results in a 
dialog, where only existing projects resp. their subfolders are chooseable as 
folders. (Surprisingly, I can see deleted projects too.) 
I would wonder, if a OS-based variable like a symlink could appear here in 
this dialog.
Comment 7 Philipe Mulet CLA 2002-04-11 12:47:32 EDT
Yes it does work fine. If you follow the junction link, then it works on 
Win2000 for me, so I guess XP should tolerate them as well.

Another way is to create an external project (set non default location) outside 
the workspace, which encloses the external classfile folder. From thereon, you 
can target the classfiles as if they were inside the workspace (which they 
logically are now).
Comment 8 Philipe Mulet CLA 2002-05-06 18:58:52 EDT
Deferring. Might reconsider if platform offers external folder to be part of 
the workspace (see bug 6664).
Comment 9 Philipe Mulet CLA 2003-02-14 09:39:25 EST
Linked folders can now be used in 2.1 stream to point at external classfiles 
folders.
Comment 10 Philipe Mulet CLA 2003-02-14 10:47:55 EST
Closing