ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd" <ber...@gmx.net>
Subject RE: Classloader Problems
Date Mon, 08 Apr 2002 06:22:54 GMT

I am not the original poster but I came across this also:

...build\build.xml:51: java.lang.IllegalAccessError: 
  class sun.reflect.GeneratedConstructorAccessor1 cannot access its superclass
     sun.reflect.ConstructorAccessorImpl
    at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:132)


> The <java> task uses a specialised classloader, which basically ignores 
> everything from the system classloader that is not in the java.* or javax.* 
> packages.  That, of course, includes sun.jdbc.odbc.JdbcOdbcDriver.

is this considered a bug or a feature?
will it change likely change in future versions?

> You have a few options:
> 
> * Use fork="true" with <java> task.

this works for me

> * Add the JVM's rt.jar to the classpath that you pass to the <java> task.

this seems to not work for me:
    <java classname="...">
       ...
	<classpath  refid="myclasspath"/>
	<classpath>
             ...
		<pathelement location="E:\Programme\JavaSoft\jdk\1.4.0\jre\lib\rt.jar"/>
	</classpath>
    </java>

can I check the classpath used in the java task?
Neither -v nor -debug seem to display this classpath?

I also tried to set CLASSPATH from the commandline, but this did not work also.

Thanks!

Bernd


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