You could also use the script task to load the class and print the
value.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 10, 2006 11:11 AM
To: Ant Users List
Subject: Antwort: Re: Displaying the value in a Java class?


Hello,

i think, what you try to do doesnt work this way.
The BCEL - thing reads the class-file, knows about the internal layout
and 
can find out things about it.
One of these is the constant - pool. Strings, doubles, long constants
are 
put there by the compiler

your public final static xxxx  is not included there. It is a 
(class-)member, which contains a reference to
some other object (probably in another class). This reference is
resolved 
when the class is loaded (simplfied).
So, i would be surprised if you find what you are looking for in your 
class-file.

I would go another way: because the class-file is available for ant, why

not write a simple task to instantiate your class,
query the property and convert the result to a string. 
Some template for a user-defined task should be available somewhere.

HTH
dvholten

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to