I generate a jar with ant but it will not use the class-path specified in the manifest file. However, when I extract the jar and package it again manually it works ok. How do I fix my ant so it works directly?
I am willing to bet that the problem is with the relative path used in the Class-Path attributed is being resolved from a directory other than the one you expect. What is used as the "current working directory" when you run "ant run" or "java -jar ..." with the ant-generated jar file? Where is this lib/BrowserLauncher2.jar located relative to that directory? If you can figure out how ant is using the directory structure, you should be able to resolve this issue.
I should mention that I have successfully used Ant to generate a jar file and run it, so I doubt the problem is with Ant itself.