You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Eryq <er...@zeegee.com> on 2001/09/13 18:09:24 UTC

How to javac *only* the .java file I am currently editting?

I'm using Ant 1.4 on Solaris, with Emacs.
My work environment is divided into projects,
each with a single build.xml, so:

	~/projects/foo/build.xml

I want my Emacs "java-mode" to be such that
if I am editting 

	~/projects/foo/src/com/zeegee/Foo.java

and i do a "C-c m", then I get Ant to recompile
the *single* Java file I happen to be editting
(of course, with -emacs, and with the classpath
as specified in my build.xml).

I do *not* want to hack includes/excludes in my
build.xml; I want build.xml to be unchanged
regardless of what file/package I am working
with at that moment.

I cannot find the manual entry or FAQ for this.
Thanks,

-- 
Eryq, http://www.zeegee.com/eryq 
WANTED:  Schrodinger's Cat.  Dead and/or Alive.

Re: How to javac *only* the .java file I am currently editting?

Posted by Eryq <er...@zeegee.com>.
Peter Donald wrote:

> > Ummm... given that "make" has had pattern-based targets
> > for *decades*, doesn't this strike you as kind of a glaring
> > omission for a tool that seeks to replace "make", and
> > whose documentation talks about "make"'s shortcomings?
> 
> Ummm... given that "C/C++" has had pointers (while java doesnt)
> for *decades*, doesn't this strike you as kind of a glaring
> omission for a language that seeks to replace "C/C++", and
> whose documentation talks about "C/C++"'s shortcomings?

There's no need for you to get defensive; it was just a
question from one user to another.  Sorry if my wording upset you.  
I was simply stunned that no one had brought the issue up before.  

Your analogy, which I will take with some humor, is a bit 
off-the-mark: Java has castable object references which are 
fairly analogous to C/C++ pointers; I was distressed because 
"ant" seemed to have nothing analogous to pattern-based rules.


> > If I'm using an editor to edit a single file,
> > the most typical action is to rebuild the thing I'm editting,
> > particularly in the rapid compile-oops_a_typo-edit-recompile
> > loop.  The second-most-typical action is to rebuild all
> > files in that same directory.  Rebuilding the world
> > comes in third because it takes so darn long.
> 
> A complete rebuild here (about 40 java file in this project) takes almost 5
> seconds .. most of that being jvm startup time. 

We have much larger projects than that here, plus
I imagine that we are dealing with slower and heavier-loaded
machines than yours, and slower disks.   Some members of
our team are *very* used to the near-immediate recompiles
that come from having "C-c m" do a "make Foo.class".
I expect that a wait of 20 seconds or more just to 
rebuild a single file will drive them bats.

However, I'm signing off on this thread because I
see that another response is of a how-to variety.

Eryq

Re: How to javac *only* the .java file I am currently editting?

Posted by Jim White <ji...@pagesmiths.com>.
At 08:41 AM 9/17/2001 +0300, Mikko Kurki-Suonio wrote:
>On Fri, 14 Sep 2001, Jim White wrote:
>
> > I'm not sure why this debate continues.  Did no one notice that I 
> posted an
> > Ant build file that satisfies the exact request made in the original post?
>
>To pick nits, that poster *specifically* requested a method that didn't
>require tweaking the build file.
>
>Maybe he meant "no tweaking every time I want to compile a different
>file", maybe he didn't, but in the end what it amounts to is that Ant is
>not Make.

What do you mean?  The poster said explicitly that passing the name of the 
file on the command line was acceptable:

At 10:57 PM 9/13/2001 -0400, Eryq wrote:
>I don't mind having to tell "ant" something like:
>
>         ant compile -class com.zeegee.Foo.class

The technique is quite general as the argument is actually a fileset 
include pattern (and so can even apply to subdirectories: 
"-Dfile=tld.foo.pack/**").  The only tweaking is that one must decided what 
sort of source file and class file layout one wishes to use (as an example 
it might have been better to show colocating the class files with the 
source files, but I never use that style).

Are are you saying the complaint is that a set of "standard" build files 
are not supplied with Ant?  That is quite silly and has nothing to do with 
the great "Ant vs Make" capability debate but simply the inescapable fact 
that Ant is brand new and has not accumulated a big set of shared build 
files.  But I'm not sure that is even useful.  As my sample demonstrates, 
any such files would be trivial and also entirely subject to tweaking due 
to developer preference.

If that is the true nature of the objection, then the answer is to simply 
wait for a tutorial or book and FAQ to be published (maybe there are some, 
I haven't looked, I do recall a magazine article was published a while ago) 
with some examples for new users.

jim

----------------------------------------------------------------
James P. White                 Netscape DevEdge Champion for IFC
IFC Exchange   *   Insanely great Java   *   http://www.ifcx.org
jim@pagesmiths.com Pagesmiths' home is http://www.pagesmiths.com


Re: How to javac *only* the .java file I am currently editting?

Posted by Mikko Kurki-Suonio <ma...@davisor.com>.
On Fri, 14 Sep 2001, Jim White wrote:

> I'm not sure why this debate continues.  Did no one notice that I posted an 
> Ant build file that satisfies the exact request made in the original post?

To pick nits, that poster *specifically* requested a method that didn't
require tweaking the build file.

Maybe he meant "no tweaking every time I want to compile a different
file", maybe he didn't, but in the end what it amounts to is that Ant is
not Make. 

//Mikko



RE: How to javac *only* the .java file I am currently editting?

Posted by Michael Laccetti <mi...@eldan.com>.
Good musical choices.  =)

-----Original Message-----
From: T Master [mailto:tmaster@iknowledgeinc.com] 
Sent: Friday, September 14, 2001 17:53
To: ant-user@jakarta.apache.org
Subject: Re: How to javac *only* the .java file I am currently editting?


Back from the garden so soon? :o)

If that person is still in employment within your company, get them to
fix it.  More efficient. Good code can be maintained easily, and the
design seen from the code, or at least the javadocs.



I find it strange for someone to use a language they can see no point
of. If I've twisted your words, I deeply apologise.


Return to the tranquil garden, and blast some dark Jungle music out :)
Or, chill out to some ambient Goldie - Timeless music.


T Master.

----- Original Message -----
From: "Diane Holt" <ho...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Friday, September 14, 2001 3:27 PM
Subject: Re: How to javac *only* the .java file I am currently editting?


> --- T Master <tm...@iknowledgeinc.com> wrote:
> > System.out.println() ??????
>
> Right -- like at every other line! :)
>
> > jdb is nice sometimes...
>
> It ain't nice if it don't work...
>
> > otherwise why debug when you can design correctly in the first place

> > ;)
>
> I've been trying to fix somebody else's code. Not only do I have zero 
> to say in the design of it, I haven't been able to figure out what the

> design even *is*.
>
> Oh well, I'm sure Java has its good points (even if I can't see any of

> them at the moment :)
>
> Diane
>
> =====
> (holtdl@yahoo.com)


Re: How to javac *only* the .java file I am currently editting?

Posted by T Master <tm...@iknowledgeinc.com>.
Back from the garden so soon? :o)

If that person is still in employment within your company, get them to fix
it.  More efficient.
Good code can be maintained easily, and the design seen from the code, or at
least the javadocs.



I find it strange for someone to use a language they can see no point of.
If I've twisted your words, I deeply apologise.


Return to the tranquil garden, and blast some dark Jungle music out :)
Or, chill out to some ambient Goldie - Timeless music.


T Master.

----- Original Message -----
From: "Diane Holt" <ho...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Friday, September 14, 2001 3:27 PM
Subject: Re: How to javac *only* the .java file I am currently editting?


> --- T Master <tm...@iknowledgeinc.com> wrote:
> > System.out.println() ??????
>
> Right -- like at every other line! :)
>
> > jdb is nice sometimes...
>
> It ain't nice if it don't work...
>
> > otherwise why debug when you can design correctly in the first place ;)
>
> I've been trying to fix somebody else's code. Not only do I have zero to
> say in the design of it, I haven't been able to figure out what the design
> even *is*.
>
> Oh well, I'm sure Java has its good points (even if I can't see any of
> them at the moment :)
>
> Diane
>
> =====
> (holtdl@yahoo.com)



Re: How to javac *only* the .java file I am currently editting?

Posted by Diane Holt <ho...@yahoo.com>.
--- T Master <tm...@iknowledgeinc.com> wrote:
> System.out.println() ??????

Right -- like at every other line! :)

> jdb is nice sometimes...

It ain't nice if it don't work...

> otherwise why debug when you can design correctly in the first place ;)

I've been trying to fix somebody else's code. Not only do I have zero to
say in the design of it, I haven't been able to figure out what the design
even *is*.

Oh well, I'm sure Java has its good points (even if I can't see any of
them at the moment :)

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: How to javac *only* the .java file I am currently editting?

Posted by T Master <tm...@iknowledgeinc.com>.
Cough....

System.out.println() ??????

use protected members!!!!

jdb is nice sometimes... otherwise why debug when you can design correctly
in the first place ;)


----- Original Message -----
From: "Diane Holt" <ho...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Friday, September 14, 2001 2:44 PM
Subject: Re: How to javac *only* the .java file I am currently editting?


> --- T Master <tm...@iknowledgeinc.com> wrote:
> >
> > Curious...  what would?
>
> Oh, it's just all that you.can't.getThere.fromHere.plonkity.plonk()
> silliness... and the rather remarkably untrue notion (apparently) that
> Java code is "self-documenting" -- and I can't even step through it to try
> and figure out what does what to what where since I can't get 'jdb' to
> work for doodley-squat... just little things like that.
>
> Not to worry -- I'm packin' it in for the day and doing some gardening :)
>
> Diane
>
> =====
> (holtdl@yahoo.com)



RE: How to javac *only* the .java file I am currently editting?

Posted by Michael Laccetti <mi...@eldan.com>.
Try using an IDE?  =)

-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com] 
Sent: Friday, September 14, 2001 16:44
To: ant-user@jakarta.apache.org
Subject: Re: How to javac *only* the .java file I am currently editting?


--- T Master <tm...@iknowledgeinc.com> wrote:
> 
> Curious...  what would?

Oh, it's just all that you.can't.getThere.fromHere.plonkity.plonk()
silliness... and the rather remarkably untrue notion (apparently) that
Java code is "self-documenting" -- and I can't even step through it to
try and figure out what does what to what where since I can't get 'jdb'
to work for doodley-squat... just little things like that.

Not to worry -- I'm packin' it in for the day and doing some gardening
:)

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/


Re: How to javac *only* the .java file I am currently editting?

Posted by Diane Holt <ho...@yahoo.com>.
--- T Master <tm...@iknowledgeinc.com> wrote:
> 
> Curious...  what would?

Oh, it's just all that you.can't.getThere.fromHere.plonkity.plonk()
silliness... and the rather remarkably untrue notion (apparently) that
Java code is "self-documenting" -- and I can't even step through it to try
and figure out what does what to what where since I can't get 'jdb' to
work for doodley-squat... just little things like that.

Not to worry -- I'm packin' it in for the day and doing some gardening :)

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

RE: How to javac *only* the .java file I am currently editting?

Posted by Michael Laccetti <mi...@eldan.com>.
Wow.

That I haven't heard.

-----Original Message-----
From: T Master [mailto:tmaster@iknowledgeinc.com] 
Sent: Friday, September 14, 2001 16:19
To: ant-user@jakarta.apache.org
Subject: Re: How to javac *only* the .java file I am currently editting?



Curious...  what would?

----- Original Message ----- 
From: "Diane Holt" <ho...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Friday, September 14, 2001 2:05 PM
Subject: Re: How to javac *only* the .java file I am currently editting?


>I end up tearing my hair out trying to do
> something in Java that would take me two minutes to do in C. .
> .
>.
> Diane



Re: How to javac *only* the .java file I am currently editting?

Posted by T Master <tm...@iknowledgeinc.com>.
Curious...  what would?

----- Original Message ----- 
From: "Diane Holt" <ho...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Friday, September 14, 2001 2:05 PM
Subject: Re: How to javac *only* the .java file I am currently editting?


>I end up tearing my hair out trying to do
> something in Java that would take me two minutes to do in C.
>. 
> .
>.
> Diane




Re: How to javac *only* the .java file I am currently editting?

Posted by Diane Holt <ho...@yahoo.com>.
--- Jim White <ji...@pagesmiths.com> wrote:
> I'm not sure why this debate continues.

It's not a debate -- and it's a different one anyway :)  I just get irked
when I see C lumped with C++ in that way, since C and C++ are two very
different animals, and there's no way Java's ever gonna replace C. And I
get especially so on a day like today when, after pleasantly coding in C
for the past couple of weeks, I end up tearing my hair out trying to do
something in Java that would take me two minutes to do in C.

> Did no one notice that I posted an Ant build file that satisfies the
> exact request made in the original post?

I saw your posting -- but it's not the answer to the "exact request made
in the original post". Eryq wanted to be able to say 'ant Foo.class',
which is clearly not the same thing as saying
'ant -Dfile=[relative/path/to/package/]Foo.java
[single-compile-target-if-not-the-default]'.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: How to javac *only* the .java file I am currently editting?

Posted by Jim White <ji...@pagesmiths.com>.
I'm not sure why this debate continues.  Did no one notice that I posted an 
Ant build file that satisfies the exact request made in the original post?

Ant is *the* way to build and install software with Java.  You just have to 
know how to use it (just like Make...).

jim

At 02:18 PM 9/14/2001 -0500, David Stagner wrote:
>Diane Holt wrote:
> >
> > --- Peter Donald <do...@apache.org> wrote:
> > > Ummm... given that "C/C++" has had pointers (while java doesnt)
> > > for *decades*, doesn't this strike you as kind of a glaring
> > > omission for a language that seeks to replace "C/C++", and
> > > whose documentation talks about "C/C++"'s shortcomings?
> >
> > I can see trying to replace C++ with Java making sense, but isn't all the
> > JVM stuff itself written in C?  How do they expect to replace C with Java
> > when they're using it to even have Java in the first place?
>
>I think Peter Donald's comment was meant as sarcasm, in response to
>complaints that Ant doesn't do some things that Make does.  Personally,
>i find both Ant and Make useful, for different but related tasks.  I
>also find both Java and C useful.  I'm still looking for a use for C++.
>:}
>--
>
>David Stagner
>
>National Marrow Donor Program
>3001 Broadway Street NE
>Broadway Ridge Suite 500
>Minneapolis, MN  55413
>
>Email: dstagner@nmdp.org

----------------------------------------------------------------
James P. White                 Netscape DevEdge Champion for IFC
IFC Exchange   *   Insanely great Java   *   http://www.ifcx.org
jim@pagesmiths.com Pagesmiths' home is http://www.pagesmiths.com


Re: How to javac *only* the .java file I am currently editting?

Posted by David Stagner <ds...@nmdp.org>.
James Bullington wrote:
> 
> My fellow Minnesotan,
> 
> I hope that the comment about C++ was also sarcasm??? <wink, wink>
> 
> --Jim

Not really.  I find C++ to be pretty much hideous and awful.  Of course,
i've never used it for large-scale projects, so i can't hate it
properly.  But i know enough to know that i'm much, much happier using
Java.  Anything too low-level for Java is almost certainly better done
in C than C++.  At one point, i read on Slashdot where Stroustrup was
claiming C++ makes a perfectly good systems language.  At the time, i
was messing with the 16/32 bit thunking in the Linux kernel
initialization routines.  Of course, C++ assumes you're working in flat
32-bit protected memory - it's impossible to use in thunking, or device
drivers, or many other low-level situations. 

But the killers are language complexity, and a poor library.  You can't
solve every problem by adding new keywords.
-- 

David Stagner

National Marrow Donor Program
3001 Broadway Street NE
Broadway Ridge Suite 500
Minneapolis, MN  55413

Email: dstagner@nmdp.org

Re: How to javac *only* the .java file I am currently editting?

Posted by T Master <tm...@iknowledgeinc.com>.
> > Unless they decide to port the java vm to be written in
> > assembly, then Java can never be seen as C/C++ replacement.
Oooooh the speed :)

> Already most of the JVMs are written in Java ... give it a few more years
and
> wait to see what comes out ;)

With some boxes having CPU speeds clocking 1Ghz, shouldn't they already be
nice?

I wouldn't know, I only have a Transmeta 600, and P166.


Have a gr8 weekend everyone    #8-)

T Master



Re: How to javac *only* the .java file I am currently editting?

Posted by Peter Donald <do...@apache.org>.
On Sat, 15 Sep 2001 05:57, Matthew Inger wrote:
> Java was not meant to "replace" C or C++.  

Sure it was. If it walks like a duck, quacks like a duck ...

> I was
> to provide a platform independent alternative, which
> removed the most common mistakes that programmers made
> (ie, pointers, and multiple inhertance [ sigh....]).

You mean they improved on the C/C++ model when creating the replacement? 
shock, horror!

> Unless they decide to port the java vm to be written in
> assembly, then Java can never be seen as C/C++ replacement.

Already most of the JVMs are written in Java ... give it a few more years and 
wait to see what comes out ;)

-- 
Cheers,

Pete

-----------------------------------------------
"Only two things are infinite, the universe and 
human stupidity, and I'm not sure about the 
former." -Albert Einstein 
-----------------------------------------------

Re: How to javac *only* the .java file I am currently editting?

Posted by Matthew Inger <ma...@sedonacorp.com>.
Java was not meant to "replace" C or C++.  I was
to provide a platform independent alternative, which
removed the most common mistakes that programmers made
(ie, pointers, and multiple inhertance [ sigh....]).
It's like saying "Visual Basic" was meant to replace C/C++.
Visual basic itself is writtern in C/C++.  It's just meant
to be an easier, less error prone language to program in
(though it seriously cripples the programmers amount of
 control)


Unless they decide to port the java vm to be written in
assembly, then Java can never be seen as C/C++ replacement.



On Fri, 2001-09-14 at 15:34, James Bullington wrote:
> My fellow Minnesotan,
> 
> I hope that the comment about C++ was also sarcasm??? <wink, wink>
> 
> --Jim
> 
> --- David Stagner <ds...@nmdp.org> wrote:
> > Diane Holt wrote:
> > > 
> > > --- Peter Donald <do...@apache.org> wrote:
> > > > Ummm... given that "C/C++" has had pointers (while java doesnt)
> > > > for *decades*, doesn't this strike you as kind of a glaring
> > > > omission for a language that seeks to replace "C/C++", and
> > > > whose documentation talks about "C/C++"'s shortcomings?
> > > 
> > > I can see trying to replace C++ with Java making sense, but isn't
> > all the
> > > JVM stuff itself written in C?  How do they expect to replace C
> > with Java
> > > when they're using it to even have Java in the first place?
> > 
> > I think Peter Donald's comment was meant as sarcasm, in response to
> > complaints that Ant doesn't do some things that Make does. 
> > Personally,
> > i find both Ant and Make useful, for different but related tasks.  I
> > also find both Java and C useful.  I'm still looking for a use for
> > C++. 
> > :}
> > -- 
> > 
> > David Stagner
> > 
> > National Marrow Donor Program
> > 3001 Broadway Street NE
> > Broadway Ridge Suite 500
> > Minneapolis, MN  55413
> > 
> > Email: dstagner@nmdp.org
> 
> 
> =====
> "Those who live in the shelter of the Most High will find rest in the shadow of the Almighty.
> This I declare of the Lord:  He alone is my refuge, my place of safety; he is my God, and I am trusting him…"
> 
> Psalms 91:1-2 (New Living Translation)
> 
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/
-- 
Matt Inger (matt.inger@sedonacorp.com)
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken 


Re: How to javac *only* the .java file I am currently editting?

Posted by T Master <tm...@iknowledgeinc.com>.
Isn't that why "Cash" aka C# aka C-Sharp was created, for a purpose of C++?
Mix it with Java and get a use.

*wonders who is taking me seriously*

T Master.


----- Original Message -----
From: "James Bullington" <sh...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Friday, September 14, 2001 1:34 PM
Subject: Re: How to javac *only* the .java file I am currently editting?


> My fellow Minnesotan,
>
> I hope that the comment about C++ was also sarcasm??? <wink, wink>
>
> --Jim
>
> --- David Stagner <ds...@nmdp.org> wrote:
> > Diane Holt wrote:
> > >
> > > --- Peter Donald <do...@apache.org> wrote:
> > > > Ummm... given that "C/C++" has had pointers (while java doesnt)
> > > > for *decades*, doesn't this strike you as kind of a glaring
> > > > omission for a language that seeks to replace "C/C++", and
> > > > whose documentation talks about "C/C++"'s shortcomings?
> > >
> > > I can see trying to replace C++ with Java making sense, but isn't
> > all the
> > > JVM stuff itself written in C?  How do they expect to replace C
> > with Java
> > > when they're using it to even have Java in the first place?
> >
> > I think Peter Donald's comment was meant as sarcasm, in response to
> > complaints that Ant doesn't do some things that Make does.
> > Personally,
> > i find both Ant and Make useful, for different but related tasks.  I
> > also find both Java and C useful.  I'm still looking for a use for
> > C++.
> > :}
> > --
> >
> > David Stagner
> >
> > National Marrow Donor Program
> > 3001 Broadway Street NE
> > Broadway Ridge Suite 500
> > Minneapolis, MN  55413
> >
> > Email: dstagner@nmdp.org
>
>
> =====
> "Those who live in the shelter of the Most High will find rest in the
shadow of the Almighty.
> This I declare of the Lord:  He alone is my refuge, my place of safety; he
is my God, and I am trusting him."
>
> Psalms 91:1-2 (New Living Translation)
>
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/
>


Re: How to javac *only* the .java file I am currently editting?

Posted by James Bullington <sh...@yahoo.com>.
My fellow Minnesotan,

I hope that the comment about C++ was also sarcasm??? <wink, wink>

--Jim

--- David Stagner <ds...@nmdp.org> wrote:
> Diane Holt wrote:
> > 
> > --- Peter Donald <do...@apache.org> wrote:
> > > Ummm... given that "C/C++" has had pointers (while java doesnt)
> > > for *decades*, doesn't this strike you as kind of a glaring
> > > omission for a language that seeks to replace "C/C++", and
> > > whose documentation talks about "C/C++"'s shortcomings?
> > 
> > I can see trying to replace C++ with Java making sense, but isn't
> all the
> > JVM stuff itself written in C?  How do they expect to replace C
> with Java
> > when they're using it to even have Java in the first place?
> 
> I think Peter Donald's comment was meant as sarcasm, in response to
> complaints that Ant doesn't do some things that Make does. 
> Personally,
> i find both Ant and Make useful, for different but related tasks.  I
> also find both Java and C useful.  I'm still looking for a use for
> C++. 
> :}
> -- 
> 
> David Stagner
> 
> National Marrow Donor Program
> 3001 Broadway Street NE
> Broadway Ridge Suite 500
> Minneapolis, MN  55413
> 
> Email: dstagner@nmdp.org


=====
"Those who live in the shelter of the Most High will find rest in the shadow of the Almighty.
This I declare of the Lord:  He alone is my refuge, my place of safety; he is my God, and I am trusting him�"

Psalms 91:1-2 (New Living Translation)

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: How to javac *only* the .java file I am currently editting?

Posted by David Stagner <ds...@nmdp.org>.
Diane Holt wrote:
> 
> --- Peter Donald <do...@apache.org> wrote:
> > Ummm... given that "C/C++" has had pointers (while java doesnt)
> > for *decades*, doesn't this strike you as kind of a glaring
> > omission for a language that seeks to replace "C/C++", and
> > whose documentation talks about "C/C++"'s shortcomings?
> 
> I can see trying to replace C++ with Java making sense, but isn't all the
> JVM stuff itself written in C?  How do they expect to replace C with Java
> when they're using it to even have Java in the first place?

I think Peter Donald's comment was meant as sarcasm, in response to
complaints that Ant doesn't do some things that Make does.  Personally,
i find both Ant and Make useful, for different but related tasks.  I
also find both Java and C useful.  I'm still looking for a use for C++. 
:}
-- 

David Stagner

National Marrow Donor Program
3001 Broadway Street NE
Broadway Ridge Suite 500
Minneapolis, MN  55413

Email: dstagner@nmdp.org

Re: How to javac *only* the .java file I am currently editting?

Posted by Peter Donald <do...@apache.org>.
On Sat, 15 Sep 2001 04:39, Diane Holt wrote:
> --- Peter Donald <do...@apache.org> wrote:
> > Ummm... given that "C/C++" has had pointers (while java doesnt)
> > for *decades*, doesn't this strike you as kind of a glaring
> > omission for a language that seeks to replace "C/C++", and
> > whose documentation talks about "C/C++"'s shortcomings?
>
> I can see trying to replace C++ with Java making sense, but isn't all the
> JVM stuff itself written in C?  How do they expect to replace C with Java
> when they're using it to even have Java in the first place?

Repeat above replacing 
* JVM with runtime
* C with assembly 
* Java with C 

;)

-- 
Cheers,

Pete

-----------------------------------------------------------
 "Remember, your body is a temple; however, it's also your 
 dancehall and bowling alley"   -- Dharma Montgomery
-----------------------------------------------------------


Re: question about javac dependencies!!!

Posted by Edgar S�nchez <ve...@yahoo.com>.
 Thank you Peter...

  Just a few questions about the build you sent:

    the src means that if the EJB directory looks for
a class file in Util, it will go to the util directory
and compiled first??? and so on for all the files that
need other files in a different directory???

  second question,
     destdir, debug, optimize and deprecation are
paths to put different kind of files resulted from the
java files???

   ${build.classes} in you example is a directory, the
same goes for ${debu}, ${optimize} and ${deprecation}?


 I'm going to make some test with this build you send.

  Thanks Peter for all your help!

VES


--- Peter Donald <do...@apache.org> wrote:
> On Sat, 15 Sep 2001 08:06, Edgar "S�nchez" wrote:
> >   Hi everyone!!!.
> >
> >   No body answer my last question, I guess it
> wasn't
> > good enough .. well never mind....  I have another
> > one...
> >
> >    I've been having troubles trying to compile my
> > project.   Let me explain myself better...
> >
> >   I have 4 directories within a directory. Each
> > directory have java files to be compiled by the
> javac
> > Ant tag.
> >
> > this is the structure:
> >
> >   Arquitecture
> >      util
> >      EJB
> >      servlets
> >      taglib
> >      startup
> 
> Would something as simple as 
> 
>     <javac srcdir="util"
>            destdir="${build.classes}"
>            debug="${debug}"
>            optimize="${optimize}"
>            deprecation="${deprecation}">
>       <classpath refid="project.class.path" />
>       <src path="EJB"/>
>       <src path="servlets"/>
>       <src path="startup"/>
>       <src path="taglib"/>
>     </javac>
> 
> work for you ?
> 
> -- 
> Cheers,
> 
> Pete
> 
>
---------------------------------------------------------------
> The difference between genius, and stupidity? Genius
> has limits
>
---------------------------------------------------------------


=====

_________________________________________________________________

"Puedes sentirte desilusionado si fallas, pero est�s condenado si no lo intentas."

"You can get disappointed if you fail down, but you are doomed if you do not try it."

ICQ #  22338121


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: question about javac dependencies!!!

Posted by Edgar S�nchez <ve...@yahoo.com>.
 Peter I used your build with some modifications....
this is how it looks like...

<?xml version="1.0"?>

<project name="petersbuild" default="fase1"
basedir=".">
<property name="Fuente"
value="D:/vicsa/Construccion/vicsa/intelgas/arquitectura"/>
<property name="Destino" value="D:/peterstest"/>
<property name="debug" value="on"/>
<property name="optimize" value="on"/>
<property name="deprecation" value="on"/>

<target name="fase1">
   <mkdir dir="${Destino}"/>
    <javac srcdir="${Fuente}"
           destdir="${Destino}"
           debug="${debug}"
           optimize="${optimize}"
           deprecation="${deprecation}">
      <!--<classpath refid="project.class.path" />-->
      <src path="${Fuente}/EJB"/>
      <src path="${Fuente}/servlets"/>
      <src path="${Fuente}/startup"/>
      <src path="${Fuente}/taglib"/>
      <src path="${Fuente}/util"/>
    </javac>
</target>
</project>

  i already have the classpath declared in my dos
windows so i think is there is no need to put it
there.

  Well, this is the build and when i run it, the build
says "duplicated class"... i don't know what could be
the problem.

  could you please help with this?

  thanks

VES

=====

_________________________________________________________________

"Puedes sentirte desilusionado si fallas, pero est�s condenado si no lo intentas."

"You can get disappointed if you fail down, but you are doomed if you do not try it."

ICQ #  22338121


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: question about javac dependencies!!!

Posted by Peter Donald <do...@apache.org>.
On Sat, 15 Sep 2001 08:06, Edgar "Sánchez" wrote:
>   Hi everyone!!!.
>
>   No body answer my last question, I guess it wasn't
> good enough .. well never mind....  I have another
> one...
>
>    I've been having troubles trying to compile my
> project.   Let me explain myself better...
>
>   I have 4 directories within a directory. Each
> directory have java files to be compiled by the javac
> Ant tag.
>
> this is the structure:
>
>   Arquitecture
>      util
>      EJB
>      servlets
>      taglib
>      startup

Would something as simple as 

    <javac srcdir="util"
           destdir="${build.classes}"
           debug="${debug}"
           optimize="${optimize}"
           deprecation="${deprecation}">
      <classpath refid="project.class.path" />
      <src path="EJB"/>
      <src path="servlets"/>
      <src path="startup"/>
      <src path="taglib"/>
    </javac>

work for you ?

-- 
Cheers,

Pete

---------------------------------------------------------------
The difference between genius, and stupidity? Genius has limits
---------------------------------------------------------------

Re: question about javac dependencies!!!

Posted by "Frank E. Weiss" <fr...@well.com>.
I thought that in Java, the import statement merely defines namespaces. When an
unqualified class name is encountered, the import statements are checked to interpolate a
fully qualified class name.

Is there any actual similarity between Java's import and C/C++'s #include?

"Edgar Sánchez" wrote:

>   ahh ok Scott
>   Thanks
>
> --- Scott Russell <Sc...@prodigy.net> wrote:
> > Not exactly, I mean the import statements in your
> > java source files. As I understand it, the
> > compiler will check the dependencies for a given
> > java source program, IF they are obtained (re:
> > imported) via fully qualified statements and will
> > ignore any files obtained via a wild carded
> > imports.
> >
> > Scott
> >
> > "Edgar Sánchez" wrote:
> > >
> > > Hi Scott
> > >
> > >    I'm not using import at all..  does the javac
> > ant
> > > task have and import task?
> > >
> > >    with javac, i'm only using:
> > >
> > >    <javac srcdir="${PATH_SOURCEEJBReg}"
> > > destdir="${PATH_DESTEJBReg}"/>
> > >
> > >   I checked the documentation for the import task
> > in
> > > javac, but it doesn't appear to be inclued with
> > javac.
> > >
> > >   Thanks Scott
> > >
> > > Edgar
> > >
> > > --- Scott Russell <Sc...@prodigy.net>
> > wrote:
> > > > Edgar,
> > > >
> > > > Are you doing imports that end in an asterisk
> > for
> > > > your own, dependent files? If so, try making
> > them
> > > > explicit imports for just those components
> > you're
> > > > using.
> > > >
> > > > for example:
> > > >       instead of...
> > > > import ../Arquitecture/util/*
> > > >       try...
> > > > import ../Arquitecture/util/Fu
> > > > import ../Arquitecture/util/Bar
> > > >   (etc.)
> > > >
> > > > Hope this helps...
> > > >
> > > > Scott
> > > >
> > > >
> > > > "Edgar Sánchez" wrote:
> > > > >
> > > > >   Hi Frank thanks for the reply...
> > > > >
> > > > >     There is a part when you talk about that
> > javac
> > > > > looks for .java files to compile and then if
> > there
> > > > is
> > > > > no file compiled or if not updated, javac do
> > the
> > > > > job.... Well in my case, using the javac ant
> > tag
> > > > > doesn't compile the java files need to proceed
> > > > with
> > > > > the rest of the project compilation.
> > > > >
> > > > >   All this jumps up to me, coz when I'm in the
> > DOS
> > > > > command session window, I do the javac in an
> > > > specific
> > > > > directory, and the javac runs fine, but when I
> > try
> > > > to
> > > > > use the same procedure just using javac Ant,
> > it
> > > > come
> > > > > out a several errors saying that the package
> > is
> > > > not
> > > > > builded.
> > > > >
> > > > >   Thats why I'm at looking for the truth, too
> > :-)
> > > > >
> > > > >   Thanks
> > > > > Edgar
> > > > >
> > > > > =====
> > > > >
> > > > >
> > > >
>
> =====
>
> _________________________________________________________________
>
> "Puedes sentirte desilusionado si fallas, pero estás condenado si no lo intentas."
>
> "You can get disappointed if you fail down, but you are doomed if you do not try it."
>
> ICQ #  22338121
>
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/


Re: question about javac dependencies!!!

Posted by Edgar S�nchez <ve...@yahoo.com>.
  ahh ok Scott
  Thanks

--- Scott Russell <Sc...@prodigy.net> wrote:
> Not exactly, I mean the import statements in your
> java source files. As I understand it, the
> compiler will check the dependencies for a given
> java source program, IF they are obtained (re:
> imported) via fully qualified statements and will
> ignore any files obtained via a wild carded
> imports.
> 
> Scott
> 
> "Edgar S�nchez" wrote:
> > 
> > Hi Scott
> > 
> >    I'm not using import at all..  does the javac
> ant
> > task have and import task?
> > 
> >    with javac, i'm only using:
> > 
> >    <javac srcdir="${PATH_SOURCEEJBReg}"
> > destdir="${PATH_DESTEJBReg}"/>
> > 
> >   I checked the documentation for the import task
> in
> > javac, but it doesn't appear to be inclued with
> javac.
> > 
> >   Thanks Scott
> > 
> > Edgar
> > 
> > --- Scott Russell <Sc...@prodigy.net>
> wrote:
> > > Edgar,
> > >
> > > Are you doing imports that end in an asterisk
> for
> > > your own, dependent files? If so, try making
> them
> > > explicit imports for just those components
> you're
> > > using.
> > >
> > > for example:
> > >       instead of...
> > > import ../Arquitecture/util/*
> > >       try...
> > > import ../Arquitecture/util/Fu
> > > import ../Arquitecture/util/Bar
> > >   (etc.)
> > >
> > > Hope this helps...
> > >
> > > Scott
> > >
> > >
> > > "Edgar S�nchez" wrote:
> > > >
> > > >   Hi Frank thanks for the reply...
> > > >
> > > >     There is a part when you talk about that
> javac
> > > > looks for .java files to compile and then if
> there
> > > is
> > > > no file compiled or if not updated, javac do
> the
> > > > job.... Well in my case, using the javac ant
> tag
> > > > doesn't compile the java files need to proceed
> > > with
> > > > the rest of the project compilation.
> > > >
> > > >   All this jumps up to me, coz when I'm in the
> DOS
> > > > command session window, I do the javac in an
> > > specific
> > > > directory, and the javac runs fine, but when I
> try
> > > to
> > > > use the same procedure just using javac Ant,
> it
> > > come
> > > > out a several errors saying that the package
> is
> > > not
> > > > builded.
> > > >
> > > >   Thats why I'm at looking for the truth, too
> :-)
> > > >
> > > >   Thanks
> > > > Edgar
> > > >
> > > > =====
> > > >
> > > >
> > >


=====

_________________________________________________________________

"Puedes sentirte desilusionado si fallas, pero est�s condenado si no lo intentas."

"You can get disappointed if you fail down, but you are doomed if you do not try it."

ICQ #  22338121


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: question about javac dependencies!!!

Posted by Scott Russell <Sc...@prodigy.net>.
Not exactly, I mean the import statements in your java source files. As I understand it, the
compiler will check the dependencies for a given java source program, IF they are obtained (re:
imported) via fully qualified statements and will ignore any files obtained via a wild carded
imports.

Scott

"Edgar Sánchez" wrote:
> 
> Hi Scott
> 
>    I'm not using import at all..  does the javac ant
> task have and import task?
> 
>    with javac, i'm only using:
> 
>    <javac srcdir="${PATH_SOURCEEJBReg}"
> destdir="${PATH_DESTEJBReg}"/>
> 
>   I checked the documentation for the import task in
> javac, but it doesn't appear to be inclued with javac.
> 
>   Thanks Scott
> 
> Edgar
> 
> --- Scott Russell <Sc...@prodigy.net> wrote:
> > Edgar,
> >
> > Are you doing imports that end in an asterisk for
> > your own, dependent files? If so, try making them
> > explicit imports for just those components you're
> > using.
> >
> > for example:
> >       instead of...
> > import ../Arquitecture/util/*
> >       try...
> > import ../Arquitecture/util/Fu
> > import ../Arquitecture/util/Bar
> >   (etc.)
> >
> > Hope this helps...
> >
> > Scott
> >
> >
> > "Edgar Sánchez" wrote:
> > >
> > >   Hi Frank thanks for the reply...
> > >
> > >     There is a part when you talk about that javac
> > > looks for .java files to compile and then if there
> > is
> > > no file compiled or if not updated, javac do the
> > > job.... Well in my case, using the javac ant tag
> > > doesn't compile the java files need to proceed
> > with
> > > the rest of the project compilation.
> > >
> > >   All this jumps up to me, coz when I'm in the DOS
> > > command session window, I do the javac in an
> > specific
> > > directory, and the javac runs fine, but when I try
> > to
> > > use the same procedure just using javac Ant, it
> > come
> > > out a several errors saying that the package is
> > not
> > > builded.
> > >
> > >   Thats why I'm at looking for the truth, too :-)
> > >
> > >   Thanks
> > > Edgar
> > >
> > > =====
> > >
> > >
> >

Re: question about javac dependencies!!!

Posted by Edgar S�nchez <ve...@yahoo.com>.
Hi Scott

   I'm not using import at all..  does the javac ant
task have and import task?

   with javac, i'm only using: 

   <javac srcdir="${PATH_SOURCEEJBReg}"
destdir="${PATH_DESTEJBReg}"/>

  I checked the documentation for the import task in
javac, but it doesn't appear to be inclued with javac.

  Thanks Scott

Edgar


--- Scott Russell <Sc...@prodigy.net> wrote:
> Edgar,
> 
> Are you doing imports that end in an asterisk for
> your own, dependent files? If so, try making them
> explicit imports for just those components you're
> using.
> 
> for example:
> 	instead of...
> import ../Arquitecture/util/*
> 	try...
> import ../Arquitecture/util/Fu
> import ../Arquitecture/util/Bar
>   (etc.)
> 
> Hope this helps...
> 
> Scott
> 
> 
> "Edgar S�nchez" wrote:
> > 
> >   Hi Frank thanks for the reply...
> > 
> >     There is a part when you talk about that javac
> > looks for .java files to compile and then if there
> is
> > no file compiled or if not updated, javac do the
> > job.... Well in my case, using the javac ant tag
> > doesn't compile the java files need to proceed
> with
> > the rest of the project compilation.
> > 
> >   All this jumps up to me, coz when I'm in the DOS
> > command session window, I do the javac in an
> specific
> > directory, and the javac runs fine, but when I try
> to
> > use the same procedure just using javac Ant, it
> come
> > out a several errors saying that the package is
> not
> > builded.
> > 
> >   Thats why I'm at looking for the truth, too :-)
> > 
> >   Thanks
> > Edgar
> > 
> > =====
> > 
> >
>
_________________________________________________________________
> > 
> > "Puedes sentirte desilusionado si fallas, pero
> est�s condenado si no lo intentas."
> > 
> > "You can get disappointed if you fail down, but
> you are doomed if you do not try it."
> > 
> > ICQ #  22338121
> > 
> > __________________________________________________
> > Terrorist Attacks on U.S. - How can you help?
> > Donate cash, emergency relief information
> >
http://dailynews.yahoo.com/fc/US/Emergency_Information/


=====

_________________________________________________________________

"Puedes sentirte desilusionado si fallas, pero est�s condenado si no lo intentas."

"You can get disappointed if you fail down, but you are doomed if you do not try it."

ICQ #  22338121


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: question about javac dependencies!!!

Posted by Scott Russell <Sc...@prodigy.net>.
Edgar,

Are you doing imports that end in an asterisk for your own, dependent files? If so, try making them
explicit imports for just those components you're using.

for example:
	instead of...
import ../Arquitecture/util/*
	try...
import ../Arquitecture/util/Fu
import ../Arquitecture/util/Bar
  (etc.)

Hope this helps...

Scott


"Edgar Sánchez" wrote:
> 
>   Hi Frank thanks for the reply...
> 
>     There is a part when you talk about that javac
> looks for .java files to compile and then if there is
> no file compiled or if not updated, javac do the
> job.... Well in my case, using the javac ant tag
> doesn't compile the java files need to proceed with
> the rest of the project compilation.
> 
>   All this jumps up to me, coz when I'm in the DOS
> command session window, I do the javac in an specific
> directory, and the javac runs fine, but when I try to
> use the same procedure just using javac Ant, it come
> out a several errors saying that the package is not
> builded.
> 
>   Thats why I'm at looking for the truth, too :-)
> 
>   Thanks
> Edgar
> 
> =====
> 
> _________________________________________________________________
> 
> "Puedes sentirte desilusionado si fallas, pero estás condenado si no lo intentas."
> 
> "You can get disappointed if you fail down, but you are doomed if you do not try it."
> 
> ICQ #  22338121
> 
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: question about javac dependencies!!!

Posted by Edgar S�nchez <ve...@yahoo.com>.
  Hi Frank thanks for the reply...

    There is a part when you talk about that javac
looks for .java files to compile and then if there is
no file compiled or if not updated, javac do the
job.... Well in my case, using the javac ant tag
doesn't compile the java files need to proceed with
the rest of the project compilation.

  All this jumps up to me, coz when I'm in the DOS
command session window, I do the javac in an specific
directory, and the javac runs fine, but when I try to
use the same procedure just using javac Ant, it come
out a several errors saying that the package is not
builded.

  Thats why I'm at looking for the truth, too :-)

  Thanks
Edgar


=====

_________________________________________________________________

"Puedes sentirte desilusionado si fallas, pero est�s condenado si no lo intentas."

"You can get disappointed if you fail down, but you are doomed if you do not try it."

ICQ #  22338121


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: question about javac dependencies!!!

Posted by "Frank E. Weiss" <fr...@well.com>.
I'd like to understand this whole javac dependency thing better myself. Maybe some
clarity will help us all?

I'm looking at jdk1.2.2 docs (maybe 1.3 docs are clearer??) In the javac documentation,
under "Searching for Types" is a description of a basic dependency process that javac
carries out by itself. This is emphasized near the end of this section by the note that
javac "can silently compile source files not mentioned on the command line". So javac is
very UNLIKE the C or C++ compilers which interpret compile requests very directly and
literally.

Whereas C and C++ use #include to find the the definitions of types used in the current
compile unit, Java uses the import pragma as well as the CLASSPATH variable and/or
command line parameter. Javac gets type definitions from class files, not the source java
files. Notice the disimilarity with C/C++. Javac looks for the needed class file (which
may be in a directory, a package directory tree, or a jar file) as well as a possible
matching source file. If the source file can't be found (or is in the wrong place) javac
will happily use the type definition in the class file. If no class file was found, but a
java source file was found, javac will compile the java file and put the resulting class
file in the proper place (but I guess not in a jar file!). If javac finds both a class
file and a java file, it checks if the class file is "up to date" with respect to the
java file. In that case it figures it can skip recompiling the java file and uses the
exisiting class file. Otherwise, it does the same as if the class file hadn't been found
(oops, what about jar files?). I'm likely to have made mistakes in this interpretation of
how javac works. If it's a small one, I hope someone finds it and corrects it. If it's
big, well, maybe I'm due for some humility.

Now one remaining thing with javac is the Xdepends command line parameter. It is said to
be slower but more reliable that the above "up to date" test. I think what this means is
that javac does NOT check if the java file with a timestamp older that the matching class
file itself needs types whose class files are not "up to date", UNLESS the Xdepends
parameter is used. There's probably a better way to say it, if it is indeed true.

Anyway, two points before we get into ant dependencies for javac: 1) javac (at least
Sun's) and C/C++ compilers are worlds apart when it comes to type up-to-dateness
checking, 2) the javac Xdepends parameter probably does a better job that ant could ever
do because it looks at the import and type dependencies..

Sorry this was sooooo long. Be gentle with me, I'm only looking for the truth.

-- Frank Weiss

"Edgar Sánchez" wrote:

>   Hi everyone!!!.
>
>   No body answer my last question, I guess it wasn't
> good enough .. well never mind....  I have another
> one...
>
>    I've been having troubles trying to compile my
> project.   Let me explain myself better...
>
>   I have 4 directories within a directory. Each
> directory have java files to be compiled by the javac
> Ant tag.
>
> this is the structure:
>
>   Arquitecture
>      util
>      EJB
>      servlets
>      taglib
>      startup
>
>   For example, some of the java files within util
> directory need that some files from "startup" has to
> be compiled first. My Ant build started with "util"
> compilation, seeing this I changed my compilation by
> doing first "startup", but it doesn't work properly,
> coz, some of the files in startup directory need from
> the EJB directory files, but if i try to javac the EJB
> directory, some files from util are needed.
>
>   So the way I found to solve the problem is compiling
> in DOS command at the beggining "EJB", after doing
> that, compiling "startup", and then run the build Ant.
>
>   Is there a way to tell Ant Javac in an automatically
> way if some file needs first to be compiled, go there,
> compile the one it needs and return?  I read something
> about depends="true" on the javac tag, i used it but
> didn't work.
>
>   Please help!!!
>
>   Thanks in advance.
>
> Vicente
>
> =====
>
> _________________________________________________________________
>
> "Puedes sentirte desilusionado si fallas, pero estás condenado si no lo intentas."
>
> "You can get disappointed if you fail down, but you are doomed if you do not try it."
>
> ICQ #  22338121
>
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/


question about javac dependencies!!!

Posted by Edgar S�nchez <ve...@yahoo.com>.
  Hi everyone!!!.

  No body answer my last question, I guess it wasn't 
good enough .. well never mind....  I have another
one...

   I've been having troubles trying to compile my
project.   Let me explain myself better...

  I have 4 directories within a directory. Each
directory have java files to be compiled by the javac
Ant tag.

this is the structure:

  Arquitecture
     util
     EJB
     servlets
     taglib
     startup

  For example, some of the java files within util
directory need that some files from "startup" has to
be compiled first. My Ant build started with "util"
compilation, seeing this I changed my compilation by
doing first "startup", but it doesn't work properly,
coz, some of the files in startup directory need from
the EJB directory files, but if i try to javac the EJB
directory, some files from util are needed.

  So the way I found to solve the problem is compiling
in DOS command at the beggining "EJB", after doing
that, compiling "startup", and then run the build Ant.

  Is there a way to tell Ant Javac in an automatically
way if some file needs first to be compiled, go there,
compile the one it needs and return?  I read something
about depends="true" on the javac tag, i used it but
didn't work.

  Please help!!!

  Thanks in advance.

Vicente

=====

_________________________________________________________________

"Puedes sentirte desilusionado si fallas, pero est�s condenado si no lo intentas."

"You can get disappointed if you fail down, but you are doomed if you do not try it."

ICQ #  22338121


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: tag

Posted by Nico Seessle <ni...@apache.org>.
----- Original Message -----
From: "Frot" <fr...@earthling.net>
To: <an...@jakarta.apache.org>
Sent: Monday, September 17, 2001 9:54 PM
Subject: <classpath> tag


> What does the <classpath> tag do ? And what are its properties ?
> I don't find it in the docs.
>

It defines a Classpath you can use in other places of your buildfile (if
defined on the top-level, outside any <target>) or a classpath for an
Ant-task that supports a nested classpath-element (for example javac).

See http://jakarta.apache.org/ant/manual/using.html#path

Nico




tag

Posted by Frot <fr...@earthling.net>.
What does the <classpath> tag do ? And what are its properties ?
I don't find it in the docs.

Fred



JUNIT & search for properties files

Posted by Frot <fr...@earthling.net>.
I currently am in search for idea's of solving following problem.

Execution of my JUnit testcases is configured using a 'test.properties' file.
Unfortunatly loading a Input Stream using 

	prop.load(new inputStream("test.properties")) ;

Does not work : the file is not found !!!

Solution to this might be using absolute paths, but that results in the familiar
problems (multiple users have different paths => BIG mess).

	prop.load(new inputStream("/tmp/test.properties")) ;

Due to the problems this is not a solution for longer term use.

My question is how to tackle this problem intelligently !! Any idea's ??

==============

My tip would be adding (how) a environment variable to the JUNIT task and use
this variable when opening the file like :

	<JUNIT .......>
		<CLASSPATH>......</CLASSPATH>
		<ABSPATH="c://temp//" />
     </JUNIT>

Now I could use this newly created variable 

	prop.load(new inputStream(System.Env("ABSPATH") + "test.properties")) ;



Thanks for any input,

Fred





netcomponents.jar user doc?

Posted by John Arrizza <jo...@arrizza.com>.
I am working on change to ftp.java and I need more info on what is available
in netcomponents.jar. Does anyone know where I can find doc or javadoc for
it?

I've checked www.savarese.org/oro/downloads and www.oroinc.com/ but both
sites are not in DNS.

John


Re: How to javac *only* the .java file I am currently editting?

Posted by Diane Holt <ho...@yahoo.com>.
--- Peter Donald <do...@apache.org> wrote:
> Ummm... given that "C/C++" has had pointers (while java doesnt)
> for *decades*, doesn't this strike you as kind of a glaring
> omission for a language that seeks to replace "C/C++", and
> whose documentation talks about "C/C++"'s shortcomings?

I can see trying to replace C++ with Java making sense, but isn't all the
JVM stuff itself written in C?  How do they expect to replace C with Java
when they're using it to even have Java in the first place?

(Going crazy today trying to do something seemingly simple in Java),
Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

RE: How to javac *only* the .java file I am currently editting?

Posted by Kevin Jones <ke...@develop.com>.
> A complete rebuild here (about 40 java file in this project)
> takes almost 5
> seconds .. most of that being jvm startup time. However
> incremental builds
> (which ant does) can take 2-3 seconds. Without JVM startup time
> that would be
> under a second.
>
> I can't see the killer time wait here ...

>From my POV the wait time isn't an issue. I often edit two or three files at
the same time, I often want to compile *one* of those files. But, if the
files have been saved (which a lot of IDEs will do automatically), they will
all be compiled by Ant, even if they are in a state where I know the compile
will fail (and yes, I know that javac will recompile them if they contain
references to each other).

Kevin Jones
Developmentor
www.develop.com

> -----Original Message-----
> From: Peter Donald [mailto:donaldp@apache.org]
> Sent: 14 September 2001 04:40
> To: ant-user@jakarta.apache.org
> Subject: Re: How to javac *only* the .java file I am currently editting?
>
>
> On Fri, 14 Sep 2001 12:57, Eryq wrote:
> > Conor MacNeill wrote:
> > > It cannot be done unless you are prepared to put support for this into
> > > the buildfile. Typically this could be accomodated by having a new
> > > target, which is only run if a property is defined. That
> property would
> > > be set to the file name to be compiled and would be used to adjust the
> > > include pattern for javac. The normal compile target would set this
> > > pattern to compile all files. You would then need to
> configure emacs to
> > > ask for the special target and pass the property specifiying
> the file to
> > > be compiled.
> >
> > Ummm... given that "make" has had pattern-based targets
> > for *decades*, doesn't this strike you as kind of a glaring
> > omission for a tool that seeks to replace "make", and
> > whose documentation talks about "make"'s shortcomings?
>
> Ummm... given that "C/C++" has had pointers (while java doesnt)
> for *decades*, doesn't this strike you as kind of a glaring
> omission for a language that seeks to replace "C/C++", and
> whose documentation talks about "C/C++"'s shortcomings?
>
> > If I'm using an editor to edit a single file,
> > the most typical action is to rebuild the thing I'm editting,
> > particularly in the rapid compile-oops_a_typo-edit-recompile
> > loop.  The second-most-typical action is to rebuild all
> > files in that same directory.  Rebuilding the world
> > comes in third because it takes so darn long.
>
> A complete rebuild here (about 40 java file in this project)
> takes almost 5
> seconds .. most of that being jvm startup time. However
> incremental builds
> (which ant does) can take 2-3 seconds. Without JVM startup time
> that would be
> under a second.
>
> I can't see the killer time wait here ...
>
> --
> Cheers,
>
> Pete
>
> ----------------------------------------------------
> "The only way to discover the limits of the possible
> is to go beyond them into the impossible."
>                              -Arthur C. Clarke
> ----------------------------------------------------


Re: How to javac *only* the .java file I am currently editting?

Posted by Peter Donald <do...@apache.org>.
On Fri, 14 Sep 2001 12:57, Eryq wrote:
> Conor MacNeill wrote:
> > It cannot be done unless you are prepared to put support for this into
> > the buildfile. Typically this could be accomodated by having a new
> > target, which is only run if a property is defined. That property would
> > be set to the file name to be compiled and would be used to adjust the
> > include pattern for javac. The normal compile target would set this
> > pattern to compile all files. You would then need to configure emacs to
> > ask for the special target and pass the property specifiying the file to
> > be compiled.
>
> Ummm... given that "make" has had pattern-based targets
> for *decades*, doesn't this strike you as kind of a glaring
> omission for a tool that seeks to replace "make", and
> whose documentation talks about "make"'s shortcomings?

Ummm... given that "C/C++" has had pointers (while java doesnt)
for *decades*, doesn't this strike you as kind of a glaring
omission for a language that seeks to replace "C/C++", and
whose documentation talks about "C/C++"'s shortcomings?

> If I'm using an editor to edit a single file,
> the most typical action is to rebuild the thing I'm editting,
> particularly in the rapid compile-oops_a_typo-edit-recompile
> loop.  The second-most-typical action is to rebuild all
> files in that same directory.  Rebuilding the world
> comes in third because it takes so darn long.

A complete rebuild here (about 40 java file in this project) takes almost 5 
seconds .. most of that being jvm startup time. However incremental builds 
(which ant does) can take 2-3 seconds. Without JVM startup time that would be 
under a second.

I can't see the killer time wait here ...

-- 
Cheers,

Pete

----------------------------------------------------
"The only way to discover the limits of the possible 
is to go beyond them into the impossible." 
                             -Arthur C. Clarke
----------------------------------------------------

Re: How to javac *only* the .java file I am currently editting?

Posted by Jim White <ji...@pagesmiths.com>.
It is done thusly:

<?xml version="1.0"?>
<project name="javac" default="compile" basedir=".">
    <property file="build.properties" />

    <property name="src" value="${basedir}"/>
    <property name="build.classes" value="${basedir}/build/classes"/>
    <property name="build.debug" value="off"/>
    <property name="build.optimize" value="off"/>

    <target name="prepare">
       <mkdir dir="${build.classes}" />
    </target>

    <target name="compile" depends="prepare">
       <javac srcdir="${src}"
              destdir="${build.classes}"
              debug="${build.debug}" optimize="${build.optimize}">
          <include name="${file}"/>
       </javac>
    </target>
</project>

Invoke with:

ant -Dfile=blah.blah.java

jim

At 10:57 PM 9/13/2001 -0400, Eryq wrote:
>Conor MacNeill wrote:
>
> > It cannot be done unless you are prepared to put support for this into 
> the buildfile. Typically this could be accomodated by having a new 
> target, which is only run if a property is defined. That property would 
> be set to the file name to be compiled and would be used to adjust the 
> include pattern for javac. The normal compile target would set this 
> pattern to compile all files. You would then need to configure emacs to 
> ask for the special target and pass the property specifiying the file to 
> be compiled.
>
>
>Ummm... given that "make" has had pattern-based targets
>for *decades*, doesn't this strike you as kind of a glaring
>omission for a tool that seeks to replace "make", and
>whose documentation talks about "make"'s shortcomings?
>
>If I'm using an editor to edit a single file,
>the most typical action is to rebuild the thing I'm editting,
>particularly in the rapid compile-oops_a_typo-edit-recompile
>loop.  The second-most-typical action is to rebuild all
>files in that same directory.  Rebuilding the world
>comes in third because it takes so darn long.
>
>I don't mind having to tell "ant" something like:
>
>         ant compile -class com.zeegee.Foo.class
>
>but not having this be part of the core functionality
>is irritating from a developer standpoint.
>
>Is there any plan to add pattern-based targets to
>"ant", along the lines of make's typical "here's
>how to build a target which looks like X"?
>
>Eryq

----------------------------------------------------------------
James P. White                 Netscape DevEdge Champion for IFC
IFC Exchange   *   Insanely great Java   *   http://www.ifcx.org
jim@pagesmiths.com Pagesmiths' home is http://www.pagesmiths.com

Re: How to javac *only* the .java file I am currently editting?

Posted by Jim White <ji...@pagesmiths.com>.
It is done thusly:

<?xml version="1.0"?>
<project name="javac" default="compile" basedir=".">
    <property file="build.properties" />

    <property name="src" value="${basedir}"/>
    <property name="build.classes" value="${basedir}/build/classes"/>
    <property name="build.debug" value="off"/>
    <property name="build.optimize" value="off"/>

    <target name="prepare">
       <mkdir dir="${build.classes}" />
    </target>

    <target name="compile" depends="prepare">
       <javac srcdir="${src}"
              destdir="${build.classes}"
              debug="${build.debug}" optimize="${build.optimize}">
          <include name="${file}"/>
       </javac>
    </target>
</project>

Invoke with:

ant -Dfile=blah/blah.java

jim

At 10:57 PM 9/13/2001 -0400, Eryq wrote:
>Conor MacNeill wrote:
>
> > It cannot be done unless you are prepared to put support for this into 
> the buildfile. Typically this could be accomodated by having a new 
> target, which is only run if a property is defined. That property would 
> be set to the file name to be compiled and would be used to adjust the 
> include pattern for javac. The normal compile target would set this 
> pattern to compile all files. You would then need to configure emacs to 
> ask for the special target and pass the property specifiying the file to 
> be compiled.
>
>
>Ummm... given that "make" has had pattern-based targets
>for *decades*, doesn't this strike you as kind of a glaring
>omission for a tool that seeks to replace "make", and
>whose documentation talks about "make"'s shortcomings?
>
>If I'm using an editor to edit a single file,
>the most typical action is to rebuild the thing I'm editting,
>particularly in the rapid compile-oops_a_typo-edit-recompile
>loop.  The second-most-typical action is to rebuild all
>files in that same directory.  Rebuilding the world
>comes in third because it takes so darn long.
>
>I don't mind having to tell "ant" something like:
>
>         ant compile -class com.zeegee.Foo.class
>
>but not having this be part of the core functionality
>is irritating from a developer standpoint.
>
>Is there any plan to add pattern-based targets to
>"ant", along the lines of make's typical "here's
>how to build a target which looks like X"?
>
>Eryq

----------------------------------------------------------------
James P. White                 Netscape DevEdge Champion for IFC
IFC Exchange   *   Insanely great Java   *   http://www.ifcx.org
jim@pagesmiths.com Pagesmiths' home is http://www.pagesmiths.com

Re: How to javac *only* the .java file I am currently editting?

Posted by Eryq <er...@zeegee.com>.
Conor MacNeill wrote:

> It cannot be done unless you are prepared to put support for this into the buildfile. Typically this could be accomodated by having a new target, which is only run if a property is defined. That property would be set to the file name to be compiled and would be used to adjust the include pattern for javac. The normal compile target would set this pattern to compile all files. You would then need to configure emacs to ask for the special target and pass the property specifiying the file to be compiled.


Ummm... given that "make" has had pattern-based targets 
for *decades*, doesn't this strike you as kind of a glaring 
omission for a tool that seeks to replace "make", and 
whose documentation talks about "make"'s shortcomings?
  
If I'm using an editor to edit a single file, 
the most typical action is to rebuild the thing I'm editting, 
particularly in the rapid compile-oops_a_typo-edit-recompile 
loop.  The second-most-typical action is to rebuild all
files in that same directory.  Rebuilding the world 
comes in third because it takes so darn long.

I don't mind having to tell "ant" something like:

	ant compile -class com.zeegee.Foo.class

but not having this be part of the core functionality
is irritating from a developer standpoint.

Is there any plan to add pattern-based targets to
"ant", along the lines of make's typical "here's
how to build a target which looks like X"?

Eryq

RE: How to javac *only* the .java file I am currently editting?

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
> From: dorfman@nlm.nih.gov [mailto:dorfman@nlm.nih.gov]On Behalf Of Eryq
> 
> I'm using Ant 1.4 on Solaris, with Emacs.
> My work environment is divided into projects,
> each with a single build.xml, so:
> 
> 	~/projects/foo/build.xml
> 
> I want my Emacs "java-mode" to be such that
> if I am editting 
> 
> 	~/projects/foo/src/com/zeegee/Foo.java
> 
> and i do a "C-c m", then I get Ant to recompile
> the *single* Java file I happen to be editting
> (of course, with -emacs, and with the classpath
> as specified in my build.xml).
> 
> I do *not* want to hack includes/excludes in my
> build.xml; I want build.xml to be unchanged
> regardless of what file/package I am working
> with at that moment.

It cannot be done unless you are prepared to put support for this into the buildfile. Typically this could be accomodated by having a new target, which is only run if a property is defined. That property would be set to the file name to be compiled and would be used to adjust the include pattern for javac. The normal compile target would set this pattern to compile all files. You would then need to configure emacs to ask for the special target and pass the property specifiying the file to be compiled.

Conor