Diagnostic.java is available on my website at:
http://cleancode.sourceforge.net/wwwdoc/download.html
(The direct link for my Java source zip file is two clicks down is:
http://prdownloads.sourceforge.net/cleancode/cleancode-java-source-v0_9_03.zip?download
)
I'll take a look at writing a cu
Could you post your Diagnostic.java code?
I think your best bet to solving the issue is to dig
under the hood of its code and see what makes it tick and experiment.
Or, certainly simpler, write a custom Ant task that gets the
information from Diagnostic and sets and Ant property. It'd only be
Yes, my constants are "public static final". The problem, I found, is that the
definition of VERSION is a method evaluation, not a compile-time constant, as you had
tried. So that answers that question.
The remaining issue is back on the file that I really want to use,
Diagnostic.class. Changing
On Jan 24, 2005, at 11:05 AM, michael sorens wrote:
(1) Well I tried adding bcel.jar to my ant/lib directory but it made
no difference.
What did make a difference was my choice of .class file to load.
Instead of my Diagnostic.class
I tried a simpler Version.class and then I received no error, eve
he Nachricht-
Von: michael sorens [mailto:[EMAIL PROTECTED]
Gesendet am: Freitag, 21. Januar 2005 17:45
An: Ant Users List
Betreff: Re: ant access of java constants
I tried adding this chunk of code:
but received this error:
C:\usr\ms\devel\cleancode-support\build.xml:100:
Maybe another process holds that file ...
Jan
> -Ursprüngliche Nachricht-
> Von: michael sorens [mailto:[EMAIL PROTECTED]
> Gesendet am: Freitag, 21. Januar 2005 19:48
> An: Ant Users List
> Betreff: Re: AW: ant access of java constants
>
> The errors I showed are
Ant Users List
Betreff: Re: ant access of java constants
I tried adding this chunk of code:
but received this error:
C:\usr\ms\devel\cleancode-support\build.xml:100: Unable to
load file: java.io.IOException
at
org.apache.tools.ant.taskdefs.LoadProperties.execute(LoadPrope
r
?
- is ${javabin} set?
Jan
-Ursprüngliche Nachricht-
Von: michael sorens [mailto:[EMAIL PROTECTED]
Gesendet am: Freitag, 21. Januar 2005 17:45
An: Ant Users List
Betreff: Re: ant access of java constants
I tried adding this chunk of code:
but received this error:
C:\usr\
- what does "-debug" say?
- is ${javabin} set?
Jan
> -Ursprüngliche Nachricht-
> Von: michael sorens [mailto:[EMAIL PROTECTED]
> Gesendet am: Freitag, 21. Januar 2005 17:45
> An: Ant Users List
> Betreff: Re: ant access of java constants
>
> I tried adding
ewProperty("out", MyClass.TEXT);
OUTPUT: ${out}
$ ant -lib .
Jan
-Ursprüngliche Nachricht-
Von: michael sorens [mailto:[EMAIL PROTECTED]
Gesendet am: Freitag, 21. Januar 2005 02:24
An: user@ant.apache.org
Betreff: ant access of java constants
Is it possible to set
<script language="javascript">
importClass(Packages.MyClass);
project.setNewProperty("out", MyClass.TEXT);
OUTPUT: ${out}
$ ant -lib .
Jan
-Ursprüngliche Nachricht-
Von: michael sorens [mailto:[EMAIL PROTECTED]
Gesendet am: Freitag, 21. Januar 2005 02:24
An: us
importClass(Packages.MyClass);
project.setNewProperty("out", MyClass.TEXT);
OUTPUT: ${out}
$ ant -lib .
Jan
> -Ursprüngliche Nachricht-
> Von: michael sorens [mailto:[EMAIL PROTECTED]
> Gesendet am: Freitag, 21. Januar 2005 02:24
> An: user@
Is it possible to set an ant property to a value that is a static constant from
a Java class file?
Example:
public class Stuff {
. . .
static final int FOOBAR=42;
. . .
}
Access with something like this...?
Or more generally, could one set a property to the value of a stat
13 matches
Mail list logo