----- Original Message -----
From: "Sundberg Jukka" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 13, 2001 1:26 PM
Subject: compiler feature
> Running a following target causes ant to create two instances of the java
> class:
>
This is probably caused by the AntClassLoader:
--- cut ---
/**
* Force initialization of a class in a JDK 1.1 compatible, albeit hacky
* way
*/
public static void initializeClass(Class theClass) {
// ***HACK*** We try to create an instance to force the VM to run
the
// class' static initializer. We don't care if the instance can't
// be created - we are just interested in the side effect.
try {
theClass.newInstance();
}
catch (Throwable t) {
//ignore - our work is done
}
}
--- cut ---
Sorry, no idea how to fix this.
Nico
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>