Bug 55225 - Launcher error
Summary: Launcher error
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.8.4
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-09 20:20 UTC by Stock
Modified: 2013-12-31 10:23 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stock 2013-07-09 20:20:34 UTC
Hi all,

I'm facing a strange behavior of Launcher class. My application is calling ANT launcher programmatically in a new process.

When I set classpath using the wildcard (something like folder/*), I received this error:

BUILD FAILED
D:\JEM-runtime\gfs\output\0000000000000000001-0000001373385349868\jcl.xml:3: The following error occurred while executing this line:
jar:file:/D:/Git/jem_the_bee/JEM/lib/ant/ant.jar!/org/apache/tools/ant/antlib.xml:37: Could not create task or type of type: componentdef.

But if I set classpath with all files (something like folder/ant.jar), it works !

IS there any restrictions to use classpath wildcard, avaialble in JDK 1.6?

Thanks a lot
Comment 1 Stefan Bodewig 2013-12-31 10:23:10 UTC
The error you see typically comes up when an old version of Ant (likely 1.6.x) is used and finds a newer version of Ant on the classpath.  In most cases you do not want the 1.6.x version of Ant and have added it by to your classpath in front of the version you really want by accident.

My wild guess is that one of the jars you are adding via wildcard imports contains Ant 1.6.x (I know some jboss jars do) and you get that into your classpath first.  When you use explicit file names you get the version of Ant you want to use first and things work fine.  "wild guess"