ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <n...@apache.org>
Subject Re: target for running a static inner class
Date Sun, 18 Feb 2001 19:12:49 GMT

----- Original Message -----
From: "Todd Cosgrove" <tcosgrov@twcny.rr.com>
To: <ant-user@jakarta.apache.org>
Sent: Sunday, February 18, 2001 7:35 PM
Subject: target for running a static inner class


> I'm trying to create a java rule to kick off a static inner class.  The
> source would be something like this:
>
[...]
> The java command line would be:
>
> java Testee$Test
>

You could either use
    <exec executable="java">
      <arg value="-cp"/>
      <arg value="."/>
      <arg value="Testee$$Test"/>
    </exec>

or

    <java classname="Testee$$Test">
      <classpath>
        <path location="."/>
      </classpath>
    </java>

if you change your code to a "public static" inner class.

Since the java-task uses reflection it is not allowed to access non-public
classes (at least I guess this from the exception since it's the same
exception if you try to access a non-public method).

Nico



Mime
View raw message