ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john guthrie <jguth...@psynapsetech.net>
Subject Re: IllegalAccessException running main
Date Fri, 17 Jan 2003 15:41:37 GMT
that's it, it wasn't. thanks.

makes sense too, since i wasn't forking a new jvm.

again, thanks!

john

Keith Hatton wrote:
> Is your "Main" class declared public?
> 
> 
> -----Original Message-----
> From: john guthrie [mailto:jguthrie@psynapsetech.net]
> Sent: 16 January 2003 21:35
> To: ant-user@jakarta.apache.org
> Subject: IllegalAccessException running main
> 
> 
> maybe not an ant problem, but here's my setup:
> from build.xml ---
>    <target name="exec" depends="compile">
>      <java classname="Main">
>        <classpath refid="run.classpath"/>
>      </java>
>    </target>
> 
> from Main.java ---
>    static public void main(String args[]) throws Exception {
>      ...
>    }
> 
> from my attempt to run 'exec' target ---
>   local> ant exec
>   Buildfile: build.xml
> 
>   init:
> 
>   compile:
>        [javac] Compiling 32 source and 0 arg files to /home/jguthrie/dest
> 
>   exec:
>       [java] java.lang.IllegalAccessException: Class 
> org.apache.tools.ant.taskdefs.ExecuteJava can not access a member of 
> class Main with modifiers "public static"
> 
>   BUILD SUCCESSFUL
>   Total time: 25 seconds
> 
> how can i get an IllegalAccessException on a "public static"?
> 
> thanks.
> john
> p.s. more oddities when i try to search for "IllegalAccessException" in 
> the archive (http://marc.theaimsgroup.com/?l=ant-user). i seem to get 
> kicked out of the search section of ant-users entirely.
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 


--
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