ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: <java> outputproperty problem?
Date Wed, 17 Sep 2008 10:16:24 GMT
This works for me
- messages are in the properties
- no output from the class on the console (just from ant)


    <javac srcdir="." destdir="."/>
    <java outputproperty="out" errorproperty="err" classname="Program" classpath="."/>
    <echo>Output: '${out}'</echo>
    <echo>Error : '${err}'</echo>

public class Program {
    public static void main(String[] args) {
        System.out.println("Hello System.out");
        System.err.println("Hello System.err");

Buildfile: build.xml
     [echo] Output: 'Hello System.out'
     [echo] Error : 'Hello System.err'


-----Urspr√ľngliche Nachricht-----
Von: jaki [] 
Gesendet: Mittwoch, 17. September 2008 11:51
Betreff: <java> outputproperty problem?

Isn't outputproperty attribute of <java> task supposed to capture values
printed by System.out.println? I have a program with a System.out.println in
it and when I run this using <java> in ant, I can see the printed value on
the console but outproperty is echoed as blank? Why must this be happening?
Should I set something to activate outputproperty?
View this message in context:
Sent from the Ant - Users mailing list archive at

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

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

View raw message