compiling a source tree

Discussion in 'Java' started by Roedy Green, Jul 16, 2005.

  1. Roedy Green

    Roedy Green Guest

    I have stared at the options, but I can see no way to get plain old
    Javac.exe to compile a source tree without you explicitly listing all
    the branches. Is this correct?

    --
    Bush crime family lost/embezzled $3 trillion from Pentagon.
    Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
    http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

    Canadian Mind Products, Roedy Green.
    See http://mindprod.com/iraq.html photos of Bush's war crimes
     
    Roedy Green, Jul 16, 2005
    #1
    1. Advertising

  2. Roedy Green

    Alan Krueger Guest

    Roedy Green wrote:
    > I have stared at the options, but I can see no way to get plain old
    > Javac.exe to compile a source tree without you explicitly listing all
    > the branches. Is this correct?


    Searching Google Groups for "javac source tree" seems enlightening.

    http://tinyurl.com/8lxal
     
    Alan Krueger, Jul 16, 2005
    #2
    1. Advertising

  3. Roedy Green

    Roedy Green Guest

    On Sat, 16 Jul 2005 17:07:48 -0500, Alan Krueger
    <> wrote or quoted :

    >http://tinyurl.com/8lxal


    that advice does not work on two counts:

    1. when I compile the root class, the other classes don't get compiled
    because it is not the root class that is using them. It is other
    packages. There is also some dynamic loading which further confuses.
    I am also trying to keep different projects under different JDKs. It
    screws things up if a compile of package B causes recompilation of
    package A. I wonder if Ant will be any better at this than my stomp
    bat scripts.



    2. his scheme would not force recompilation for out of date class
    file.

    I guess it is ant time.

    --
    Bush crime family lost/embezzled $3 trillion from Pentagon.
    Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
    http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

    Canadian Mind Products, Roedy Green.
    See http://mindprod.com/iraq.html photos of Bush's war crimes
     
    Roedy Green, Jul 17, 2005
    #3
  4. Roedy Green

    Joan Guest

    "Roedy Green" <> wrote in message
    news:...
    > I have stared at the options, but I can see no way to get plain old
    > Javac.exe to compile a source tree without you explicitly listing all
    > the branches. Is this correct?
    >

    Is that all you want? Where do you want the class files to be put?
    In the same directory as the java files? In a central directory? In a
    parallel branch with root name "bin"?
    It isn't so hard to use Ant I think, then you have all the choices
    available to you.
     
    Joan, Jul 17, 2005
    #4
  5. Roedy Green

    Roedy Green Guest

    On Sat, 16 Jul 2005 20:25:50 -0500, "Joan" <> wrote
    or quoted :

    >Is that all you want? Where do you want the class files to be put?
    >In the same directory as the java files? In a central directory? In a
    >parallel branch with root name "bin"?
    >It isn't so hard to use Ant I think, then you have all the choices
    >available to you.


    IT would be fine if they went back where they came from.

    I have two different problems.

    1. getting the build done for myself.

    2. handing something simple over to novices to build that just uses
    BAT files. This is for people just learning Java who download the
    source that comes with everything I write.

    --
    Bush crime family lost/embezzled $3 trillion from Pentagon.
    Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
    http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

    Canadian Mind Products, Roedy Green.
    See http://mindprod.com/iraq.html photos of Bush's war crimes
     
    Roedy Green, Jul 17, 2005
    #5
  6. On Sat, 16 Jul 2005 23:50:13 +0000, Roedy Green wrote:


    > 2. his scheme would not force recompilation for out of date class
    > file.


    Normally, javac does check if a source file is available for a classfile,
    and if it has a newer modification data, will recompile it.

    --
    You can't run away forever,
    But there's nothing wrong with getting a good head start.
    --- Jim Steinman, "Rock and Roll Dreams Come Through"
     
    Stefan Schulz, Jul 17, 2005
    #6
  7. Roedy Green

    Chris Head Guest

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Roedy Green wrote:
    [snip]
    > 2. handing something simple over to novices to build that just uses
    > BAT files. This is for people just learning Java who download the
    > source that comes with everything I write.
    >


    I guess that you can't guarantee a nice Cygwin bash environment being
    installed... if you could, then this ought to work really nicely:

    javac <options> `find . -name *.java`

    .... and could be put into a .sh file for easier access. I think that,
    given multiple source files on the command-line, javac will even
    timestamp-check them and not bother recompiling things that don't need
    it (but don't quote me on that point).

    Chris
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.1 (MingW32)

    iD8DBQFC4D0MgxSrXuMbw1YRAtA+AJ9hUg6zOQV3n1oBm8WMrk7oABmRgQCdGgkr
    dfsgT9nnfj5BFglOKQgMRqw=
    =6C1m
    -----END PGP SIGNATURE-----
     
    Chris Head, Jul 22, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Rudolf

    Compiling a source tree.

    Dave Rudolf, Jan 5, 2004, in forum: Java
    Replies:
    4
    Views:
    973
    Tor Iver Wilhelmsen
    Jan 5, 2004
  2. Stub

    B tree, B+ tree and B* tree

    Stub, Nov 12, 2003, in forum: C Programming
    Replies:
    3
    Views:
    10,133
  3. Garrett Cooper
    Replies:
    0
    Views:
    557
    Garrett Cooper
    Feb 24, 2009
  4. Garrett Cooper
    Replies:
    0
    Views:
    499
    Garrett Cooper
    Feb 24, 2009
  5. Lon Baker
    Replies:
    1
    Views:
    224
    Csaba Henk
    Mar 21, 2005
Loading...

Share This Page