Re: AW: ant access of java constants

2005-01-25 Thread michael sorens
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

Re: AW: ant access of java constants

2005-01-24 Thread Erik Hatcher
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

Re: AW: ant access of java constants

2005-01-24 Thread michael sorens
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

Re: AW: ant access of java constants

2005-01-24 Thread Erik Hatcher
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

Re: AW: ant access of java constants

2005-01-24 Thread michael sorens
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:

AW: AW: ant access of java constants

2005-01-23 Thread Jan . Materne
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

Re: AW: ant access of java constants

2005-01-21 Thread Erik Hatcher
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

Re: AW: ant access of java constants

2005-01-21 Thread michael sorens
? - 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\

AW: ant access of java constants

2005-01-21 Thread Jan . Materne
- 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

Re: ant access of java constants

2005-01-21 Thread michael sorens
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

Re: AW: ant access of java constants

2005-01-21 Thread Erik Hatcher
<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

AW: ant access of java constants

2005-01-20 Thread Jan . Materne
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@

ant access of java constants

2005-01-20 Thread michael sorens
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