ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Mars" <rm...@cisco.com>
Subject How do I build an ant rule to run an inner class' main method?
Date Wed, 30 Jan 2002 18:42:41 GMT
E.G., I want to run "com.mycompany.mypackage.MyClass$Test".  The embedded
'$' is getting translated by ant.  Using &#36; doesn't solve this problem.
Escaping the dollar sign with a backslash results in ant translating the
backslash to a forward slash.

Here's the rule I'm trying to get working:

    <target name="test">
        <java classname="com.mycompany.mypackage.MyClass$Test">
            <classpath>
                <pathelement path="${java.class.path}"/>
            </classpath>
        </java>
    </target>


for:

pacakge com.mycompany.mypackage;

public class MyClass {
	...

	public static class Test {
		public static void main(String[] args) {
			// run tests
			...
		}
	}
}


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message