Andrew Gray
2005-06-13 06:27:49 UTC
Could anyone help me with this.
I have a requirement to add (the contents of) a directory to the java classpath. This directory is a 'resources' directory within a project, and exists alongside the 'class'es directory.
Looking in the JBuilder (2005) interface - it looks as if the project output directory is automatically added to the cp, and you can also add other projects/libraries to the cp (Project Properties -> Paths), but I cannot see a way of adding another directory in the current project to the classpath.
I can use 'Configure Libraries' to assign multiple directories/archives to a given project, which I can then add to the cp of a different project, but presumably this does not help, as if I were to add the resource area in this way, and then make a project depend on itself, then the class archive would be added aswell.
The only way I can see at the moment is to define a seperate Library eg 'MyProject-Resources' alongside 'MyProject' in Configure Libraries - which just references the resources directory, and then add this to the path references of 'MyProject' - however, this looks like a nasty hack.
Is there a better way of doing this ?
Thanks in advance,
Dr Andrew Gray
I have a requirement to add (the contents of) a directory to the java classpath. This directory is a 'resources' directory within a project, and exists alongside the 'class'es directory.
Looking in the JBuilder (2005) interface - it looks as if the project output directory is automatically added to the cp, and you can also add other projects/libraries to the cp (Project Properties -> Paths), but I cannot see a way of adding another directory in the current project to the classpath.
I can use 'Configure Libraries' to assign multiple directories/archives to a given project, which I can then add to the cp of a different project, but presumably this does not help, as if I were to add the resource area in this way, and then make a project depend on itself, then the class archive would be added aswell.
The only way I can see at the moment is to define a seperate Library eg 'MyProject-Resources' alongside 'MyProject' in Configure Libraries - which just references the resources directory, and then add this to the path references of 'MyProject' - however, this looks like a nasty hack.
Is there a better way of doing this ?
Thanks in advance,
Dr Andrew Gray