Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

src directory organisation

Status
Not open for further replies.

JackMH

Programmer
Nov 9, 2001
18
US
I noted an earlier post that descried the *need* to organize the src sub-directories in a manner that mirrors the Java packages.
I find such a requirement a major inconvenience, in fact bordering on the absurd and am hoping that there is some way around it. If anyone has a way of working around this requirement I would be most appreciative.

JackMH

 
It is a natural way to do things, as the compiler AS STANDARD REQUIRES sourcefiles to be in directories mirroring their package structure.
This is a decision by Sun which overall works well (it only can get a bit problematical if you want to move some classes from one package to another (for which JBuilder provides a wizard which you can freely configure to do it for you)

JBuilder does also allow you to add multiple sourcetrees into a project if needed.
 
Jwenting,

Thanks for the prompt reply. I guess we are going to have to agree to disagree regarding what is 'natural'.
However the requirement to structure the source files as a mirror of the Java packages was a Borland Jbuilder decision not Sun. I use the Sun Java SDK with other Java IDE'e and from the command line. In those environments I can keep the source files according to my convention and build packages according to the package statements and they can be quite independant.

In the event that there are others who would prefer the independant control of the location of source and packages I did find a solution and that is using either 'symbolic' or 'hard' links for files, i.e. the ability for a file to be stored once but appear as several different directory entries. That way I could keep the files where I wish and provide a source project tree in accordance with the JBuilder requirements that included 'links' to the actual files.
The NTFS file system has the capability to support 'links' but, as far as I know, MS does not provide any utilities to use them !!!. Fortunately I found several third party utilities, the best known being 'Hard Link magic' ( which provide the capability.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top