Place the monitor.properties in the build dir?
Im not sure of that. actually i thought the class looks fr the monitor.properties file in the same dir as the class is. Try putting the file in the same place as your jar file.

Actually when i had tried this, I had put the class in the same dir as my build file (alongwith the properties file) and set the classpath to include the build dir.

Maybe this should help.


-----Original Message-----
From: Eddie Bernard [mailto:ebernard@digitalthink.com]
Sent: Thursday, April 26, 2001 12:52 PM
To: ant-user@jakarta.apache.org
Subject: Setting up the BuildMonitor listener


Please excuse the newbie question, but this has been driving me bonkers for
the last couple of days....

I'm attempting to configure the BuildMonitor listener provided by Will
Glozer.  Here are the steps I performed:

1.  Compile the BuildMonitor.java code

2.  Create a jar with the BuildMonitor.class and place it in my Ant lib
directory.  Here are the contents
          0 Thu Apr 19 13:36:16 PDT 2001 META-INF/
    71 Thu Apr 19 13:36:16 PDT 2001 META-INF/MANIFEST.MF
   3515 Wed Apr 25 17:53:40 PDT 2001 ./BuildMonitor.class

3.  Create the monitor.properties file in the same directory as my build
file

Now, when I execute the following command:

ant -logfile build.log -listener BuildMonitor

I get the following error in the log file:
Buildfile: build.xml

BUILD FAILED

Unable to instantiate listener BuildMonitor
--- Nested Exception ---
java.lang.NullPointerException
        at java.io.Reader.<init>(Reader.java:66)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:85)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:74)
        at java.util.Properties.load(Properties.java:176)
        at BuildMonitor.<init>(BuildMonitor.java:27)
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:241)
        at org.apache.tools.ant.Main.addBuildListeners(Main.java, Compiled
Code)

        at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
        at org.apache.tools.ant.Main.main(Main.java:149)

Total time: 0 seconds

To me, it appears that it's not finding the monitor.properties.  If so, then
my question is where should this property file be located w.r.t to the
invocation of Ant?

Any ideas?