On 2/1/06, robert burrell donkin <[EMAIL PROTECTED]> wrote: > > i've been playing around with ways to persuade ant to switch JCL > diagnostics on which means setting a system property. i know workarounds > (like defining a trivial task, for example) but i'm sure that there must > be an elegant way to do this which i just can't discover. since it's for > some documentation, i'd prefer to suggest users do it the right way.
Is this in the context of running some JUnit tests? If so, the <junit> task accepts nested <sysproperty> elements to set system properties that are passed in to the executing tests. (IIRC you also have to say fork="true" for this to work, because you won't want to mess with the JVM that Ant itself is running in). Programmatically, of course, you can call System.setProperty() if your security manager lets you (or if you're not running under a security manager). anyone know? > > - robert Craig --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
