ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dick, Brian E." <>
Subject RE: Antwort: Re: Displaying the value in a Java class?
Date Fri, 10 Feb 2006 16:17:43 GMT
You could also use the script task to load the class and print the

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


i think, what you try to do doesnt work this way.
The BCEL - thing reads the class-file, knows about the internal layout
can find out things about it.
One of these is the constant - pool. Strings, doubles, long constants
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
when the class is loaded (simplfied).
So, i would be surprised if you find what you are looking for in your 

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message