Hey guys,
I may have found another solution or at least it has worked for me. When I just tried to run an ant build from MyEclipse I was getting the same exact error message about no swt dll found in path.
Here is what is going on to the best of my knowledge. The SWT plugin jar for eclipse contains 4 windows DLLs. The OSGI runtime will unzip these DLLs and place them somewhere in the configuration area, then it will add this path to the Windows library lookup path. And so when your ant script fires up, eclipse will give the ANT execution the same java.library.path that has been set for Eclipse itself, which in most cases works just fine and it will pick up the 4 SWT DLLs from the configuration area.
The reason it doesn’t work within MyEclipse is because during installation, MyEclipse installs an SWT fragment plugin into the Eclipse platform. Fragments in eclipse are merged into the host plugin which in this case is SWT. However, by doing this, the JRE’s java.library.path is being changed from the orignal location of the 4 SWT DLL plugins and instead uses the MyEclipse SWT Fragment’s location.
To fix this issue, I was able to do the following:
– Your ant build will have created an External Tools Launch Configuration
– Open Run > External Tools > External Tools…
– Click on your ant build that is getting the error
– Switch to the JRE tab
– Set the first option Runtime JRE to “Run in the same JRE as the workspace”
When I set this option, I was able to launch my ant build that used the <input> field. I hope this will at least fix the problem for a few of you guys.