Re: Q: Java source and directory structure - 'standard way' ?
From: FISH (joeking_at_merseymail.com)
Date: 01/26/04
- Next message: Konrad Den Ende: "Re: Strange behavior of a java.util.Vector"
- Previous message: Martin: "JSP 2.0 problem in Tomcat5.0.16"
- In reply to: Raymond DeCampo: "Re: Q: Java source and directory structure - 'standard way' ?"
- Next in thread: Raymond DeCampo: "Re: Q: Java source and directory structure - 'standard way' ?"
- Reply: Raymond DeCampo: "Re: Q: Java source and directory structure - 'standard way' ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Jan 2004 03:13:54 -0800
Raymond DeCampo <rdecampo@spam-I-am-not.twcny.rr.com> wrote in message news:<qjGQb.76871$Su5.30054@twister.nyroc.rr.com>...
> Let me address your concerns:
>
> 1) The compiler does create the output; the source code and the
> directories it is contained in are input.
Ah yes, but in Java the package 'hierarchy' is part of the output, so
surely it is more correct that the directories should be constructed
by the compiler - by referencing the source - than created by the
programmer by hand...?
> 2) One can still use the -d flag to separate source and class files.
Which begs the question, why not use -d all the time? (Then you never
get source and binary intermixed in the same directories!)
Hmmmm... :-)
> 3) I was going to dismiss this concern as silly, but the JLS does
> explicitly mention using a database to store classes, so that would have
> been wrong of me. However, I doubt this is a serious concern for the
> near future.
I think this pretty much answers the question for me. The fact that
it 'works for now' would suggest to me that this union (in the C
sense of the word) of source and output directories it is not a
desirable way to structure code - and obviously not a 'standard way'.
It works because the compiler will output to the same directory as
the source, if not directed. I'm not sure if this default behaviour
can be guaranteed in future, or on all compilers - so I'd rather
avoid it.
> Finally, let me suggest that you try out ANT. ANT provides a way of
> easily specifying how to build your code. It can run the compiler and
> jar the files. As an added bonus you can distribute the build script
> and everyone working on the code will be able to build it in the same way.
I already use Ant, thanks :-) In fact the package I mentioned is
actually used in one of the many extensions to Ant, called ImTask.
Thanks for your input, but I think I'll stick to packaging the source
in a way that makes sense to the project, and leave the compiler to
figure out how it wants to implementent the package 'hierarchy' - it
probably has a better idea than I do :-)
Thanks,
-FISH- ><>
- Next message: Konrad Den Ende: "Re: Strange behavior of a java.util.Vector"
- Previous message: Martin: "JSP 2.0 problem in Tomcat5.0.16"
- In reply to: Raymond DeCampo: "Re: Q: Java source and directory structure - 'standard way' ?"
- Next in thread: Raymond DeCampo: "Re: Q: Java source and directory structure - 'standard way' ?"
- Reply: Raymond DeCampo: "Re: Q: Java source and directory structure - 'standard way' ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|