ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Mars" <>
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">
                <pathelement path="${java.class.path}"/>


pacakge com.mycompany.mypackage;

public class MyClass {

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

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

View raw message