You can't directly. You can cause ant to execute a script or program that might be able to do that for you however. Bear in mind that modifying environment variables under program control is tricky (since usually changes will not span processes) and highly platform dependent. hth. bear
We kinda need some more information about what you are trying to do within ant. Remember that env variable changes only apply to the current process. Perhaps there's a better way to set up the classpath for what you are trying to do other than the env variable. bear