ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: IllegalAccessError when using java task
Date Sat, 25 Nov 2000 21:45:08 GMT
Hmm. If they are being loaded by different loaders, the package access
won't help you, probably. If you run ant-debug, you may be able to see
which class loader is being used for each class. It may then be a case
of adjusting your classpaths.

Conor


> -----Original Message-----
> From: jpschewe@workstation.mn.mtu.net
> [mailto:jpschewe@workstation.mn.mtu.net]On Behalf Of Jon Schewe
> Sent: Sunday, 26 November 2000 5:05
> To: ant-user@jakarta.apache.org
> Subject: IllegalAccessError when using java task
>
>
> I'm trying to call one of my own java programs from inside
> Ant.  When I
> specify fork="yes" everything works fine, if I don't specify
> that I get this
> IllegalAccessError:
> /home/jpschewe/projects/java/foo/antTest/build.xml:47:
> java.lang.IllegalAccessError: try to access class
> org.tcfreenet.schewe.assert.ColumnTracker from class
> org.tcfreenet.schewe.assert.JonsAssert
> java.lang.IllegalAccessError: try to access class
> org.tcfreenet.schewe.assert.ColumnTracker from class
> org.tcfreenet.schewe.assert.JonsAssert
> 	at
> org.tcfreenet.schewe.assert.JonsAssert.parseFile(JonsAssert.java:162)
> 	at
> org.tcfreenet.schewe.assert.JonsAssert.doFile(JonsAssert.java:127)
> 	at
> org.tcfreenet.schewe.assert.JonsAssert.doFile(JonsAssert.java:121)
> 	at
> org.tcfreenet.schewe.assert.JonsAssert.doFile(JonsAssert.java:121)
> 	at
> org.tcfreenet.schewe.assert.JonsAssert.main(JonsAssert.java:93)
> 	at java.lang.reflect.Method.invoke(Native Method)
> 	at
> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.
> java:107)
> 	at org.apache.tools.ant.taskdefs.Java.run(Java.java:245)
> 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:122)
> 	at org.apache.tools.ant.taskdefs.Java.execute(Java.java:86)
> 	at org.apache.tools.ant.Target.execute(Target.java:142)
> 	at org.apache.tools.ant.Project.runTarget(Project.java:818)
> 	at org.apache.tools.ant.Project.executeTarget(Project.java:532)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java:506)
> 	at org.apache.tools.ant.Main.runBuild(Main.java:420)
> 	at org.apache.tools.ant.Main.main(Main.java:149)
>
> The class ColumnTracker does indeed have package access, but
> the class it's
> being called from, JonsAssert, is in the same package, so I'm
> not sure what
> the problem is.  I'd rather not have the extra overhead of
> starting up another
> process.
>
> I'm using Ant 1.2 with JDK 1.3.0 and jikes 1.12 on Linux.
>
>
> --
> Jon Schewe | http://eggplant.mtu.net/~jpschewe
> For I am convinced that neither death nor life, neither angels
> nor demons, neither the present nor the future, nor any
> powers, neither height nor depth, nor anything else in all
> creation, will be able to separate us from the love of God that
> is in Christ Jesus our Lord. - Romans 8:38-39
> NOTE: My first name has no 'h' in it!  Please be observant.
>
>


Mime
View raw message