You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by WebServices Development <We...@csx.com> on 2013/01/15 02:23:50 UTC

Which javac does ant use in its "javac" task?

I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.

When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.

In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.

In ANT execution, it does not expand the list, so the compile fails.

From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.

So, the questions I have are

-  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?

-  What role does JAVA_HOME play when using ANT?

-  How can I resolve the issue, so I can use ANT with wildcard classpath ?


Thank you






-----------------------------------------
This email transmission and any accompanying attachments may
contain CSX privileged and confidential information intended only
for the use of the intended addressee.  Any dissemination,
distribution, copying or action taken in reliance on the contents
of this email by anyone other than the intended recipient is
strictly prohibited.  If you have received this email in error
please immediately delete it and  notify sender at the above CSX
email address.  Sender and CSX accept no liability for any damage
caused directly or indirectly by receipt of this email.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Which javac does ant use in its "javac" task?

Posted by WebServices Development <We...@csx.com>.
I do not want to continue to use the below construct because this lists the complete set of jars and the classpath length is going above 14000 characters.  Want to shorten it.  This is what we are doing at the moment.

Ant should accept wildcard classpath because it is supposed to be implemented in ANT starting with version 1.8.2 according to the documentation.


-----Original Message-----
From: Welsh, Armand [mailto:AWelsh@StateStreet.com] 
Sent: Wednesday, January 16, 2013 3:40 PM
To: Ant Users List
Subject: RE: Which javac does ant use in its "javac" task?

I understand this won't answer your question, but why wouldn't you just build your classpath using the path element tag, and let ANT build the fully qualified list instead of using wildcards in the javac classpath?  You can do what you want like this:


	<path id="project.class.path">
		<fileset dir="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib" includes="**/*.*"/>
		<fileset dir="/home/ab/antcode/build/classes" includes="**/*.class"/>
		<fileset dir="/opt/local/software/websphere/v7/lib" includes="**/*.*" />
		<fileset dir="/opt/local/software/websphere/v7/plugins" includes="**/*.*"/>
	</path>

	<javac listfiles="true" srcdir="${source.dir}" deprecation="true" debug="true" debuglevel="source,lines">
		<classpath refid="project.class.path" />
	</javac>


>From what I understand about ant, unless you set fork=true, it will use the internal compiler in the current running jre/jdk, it doesn't actually call the javac executable on the filesystem.  So, in this way, I don't see why the javac target's classpath should accept wildcards in the classpath since you aren't using the command line parser of the javac executable.

Of course, I don't really know how ant makes the actual javac call I am extrapolating this from what little details do exist in the documentation.

-----Original Message-----
From: WebServices Development [mailto:WebServices_Development@csx.com] 
Sent: Tuesday, January 15, 2013 5:40 PM
To: Ant Users List
Subject: RE: Which javac does ant use in its "javac" task?

Thank you.  I presume this is answer to my first question - Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?  Is this javac class a java compiler class, or just a class that defines ANT's javac task ?   If it is a compiler, then does it mean that ANT's javac is having trouble dealing with wildcard classpaths then?

Then, What role does JAVA_HOME play when using ANT?

Thanks again.

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Tuesday, January 15, 2013 7:00 PM
To: Ant Users List
Subject: RE: Which javac does ant use in its "javac" task?


you will find a javac key in .\org\apache\ant\taskdefs\default.propertiesjavac=org.apache.tools.ant.taskdefs.Javac defaults.properties is wholly contained within ant.jar inside $ANT_HOME\lib\ant.jar

Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

 > From: WebServices_Development@csx.com
> To: user@ant.apache.org
> Subject: RE: Which javac does ant use in its "javac" task?
> Date: Tue, 15 Jan 2013 23:38:40 +0000
> 
> Sorry, there was a typo on javac call classpath.  It should have been
> 
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d 
> /home/ab/antcode/build/classes -classpath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/
> lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/
> lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 
> -g:none -source 1.6 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/event/*.java 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/vo/*.java > commandline.log 2>&1
> 
> 
> Command line
> -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*:
> 
> 
> Ant
> 
> <classpath 
> path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WE
> B-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software
> /websphere/v7/plugins/*"/>
> 
> 
> 
> _____________________________________________
> From: WebServices Development
> Sent: Tuesday, January 15, 2013 6:06 PM
> To: Ant Users List
> Subject: RE: Which javac does ant use in its "javac" task?
> 
> 
> Actually, currently I am testing with hardcoding the classpath as in 
> below task definition.  I ultimately want to create a classpath from a 
> string, but that is next question, if I can get this working.  This is 
> the same path I am using in my commandline javac call
> 
> 
>         <!-- Compile Classes -->
>         <target name="compile" depends="init, prepare" description="Compile the classes">
>                 <property name="myclasspath" refid="test.classpath"/>
>                     <echo message="myclasspath= ${myclasspath}"/>
>                 <javac srcdir="${src.paths}"
>                        failonerror="true"
>                        includeantruntime="false"
>                        destdir="${build.dir}/classes"
>                         debug="${javac.debug}"
>                        debuglevel="${javac.debuglevel}"
>                        verbose="true"
>                        memoryMaximumSize="${javac.memoryMaximumSize}"
>                      fork="yes"
>                      executable="/opt/local/software/websphere/v7/java/bin/javac"
>                        source="1.6"
>                        target="1.6">
>             <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
>                 </javac>
>         </target>
> 
> 
> Commandline javac call
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d 
> /home/ab/antcode/build/classes -classpath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-I
> NF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/
> v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 
> -g:none -source 1.6 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/event/*.java 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/vo/*.java > commandline.log 2>&1
> 
> 
> Thanks for any help you can provide.
> 
> -----Original Message-----
> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
> Sent: Tuesday, January 15, 2013 3:41 PM
> To: Ant Users List
> Subject: Re: Which javac does ant use in its "javac" task?
> 
> Without knowing how you are creating the classpath for ant to use, it is impossible to say why it is not working for you.  It may be something as simple as using the wildcard in a way that has ant expanding it rather than it being passed through to javac.
> 
> Maury
> 
> 
> On 01/14/13 17:23, WebServices Development wrote:
> > I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
> >
> > When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
> >
> > In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
> >
> > In ANT execution, it does not expand the list, so the compile fails.
> >
> >  From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
> >
> > So, the questions I have are
> >
> > -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
> >
> > -  What role does JAVA_HOME play when using ANT?
> >
> > -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
> >
> >
> > Thank you
> >
> >
> >
> >
> >
> >
> > -----------------------------------------
> > This email transmission and any accompanying attachments may contain 
> > CSX privileged and confidential information intended only for the 
> > use of the intended addressee.  Any dissemination, distribution, 
> > copying or action taken in reliance on the contents of this email by 
> > anyone other than the intended recipient is strictly prohibited.  If 
> > you have received this email in error please immediately delete it 
> > and  notify sender at the above CSX email address.  Sender and CSX 
> > accept no liability for any damage caused directly or indirectly by 
> > receipt of this email.
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: 
> > user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.o
> > rg> For additional commands, e-mail: 
> > user-help@ant.apache.org<ma...@ant.apache.org>
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: 
> user-help@ant.apache.org<ma...@ant.apache.org>
> 
> 
 		 	   		  

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Which javac does ant use in its "javac" task?

Posted by "Welsh, Armand" <AW...@StateStreet.com>.
I understand this won't answer your question, but why wouldn't you just build your classpath using the path element tag, and let ANT build the fully qualified list instead of using wildcards in the javac classpath?  You can do what you want like this:


	<path id="project.class.path">
		<fileset dir="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib" includes="**/*.*"/>
		<fileset dir="/home/ab/antcode/build/classes" includes="**/*.class"/>
		<fileset dir="/opt/local/software/websphere/v7/lib" includes="**/*.*" />
		<fileset dir="/opt/local/software/websphere/v7/plugins" includes="**/*.*"/>
	</path>

	<javac listfiles="true" srcdir="${source.dir}" deprecation="true" debug="true" debuglevel="source,lines">
		<classpath refid="project.class.path" />
	</javac>


>From what I understand about ant, unless you set fork=true, it will use the internal compiler in the current running jre/jdk, it doesn't actually call the javac executable on the filesystem.  So, in this way, I don't see why the javac target's classpath should accept wildcards in the classpath since you aren't using the command line parser of the javac executable.

Of course, I don't really know how ant makes the actual javac call I am extrapolating this from what little details do exist in the documentation.

-----Original Message-----
From: WebServices Development [mailto:WebServices_Development@csx.com] 
Sent: Tuesday, January 15, 2013 5:40 PM
To: Ant Users List
Subject: RE: Which javac does ant use in its "javac" task?

Thank you.  I presume this is answer to my first question - Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?  Is this javac class a java compiler class, or just a class that defines ANT's javac task ?   If it is a compiler, then does it mean that ANT's javac is having trouble dealing with wildcard classpaths then?

Then, What role does JAVA_HOME play when using ANT?

Thanks again.

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Tuesday, January 15, 2013 7:00 PM
To: Ant Users List
Subject: RE: Which javac does ant use in its "javac" task?


you will find a javac key in .\org\apache\ant\taskdefs\default.propertiesjavac=org.apache.tools.ant.taskdefs.Javac defaults.properties is wholly contained within ant.jar inside $ANT_HOME\lib\ant.jar

Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

 > From: WebServices_Development@csx.com
> To: user@ant.apache.org
> Subject: RE: Which javac does ant use in its "javac" task?
> Date: Tue, 15 Jan 2013 23:38:40 +0000
> 
> Sorry, there was a typo on javac call classpath.  It should have been
> 
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d 
> /home/ab/antcode/build/classes -classpath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/
> lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/
> lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 
> -g:none -source 1.6 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/event/*.java 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/vo/*.java > commandline.log 2>&1
> 
> 
> Command line
> -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*:
> 
> 
> Ant
> 
> <classpath 
> path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WE
> B-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software
> /websphere/v7/plugins/*"/>
> 
> 
> 
> _____________________________________________
> From: WebServices Development
> Sent: Tuesday, January 15, 2013 6:06 PM
> To: Ant Users List
> Subject: RE: Which javac does ant use in its "javac" task?
> 
> 
> Actually, currently I am testing with hardcoding the classpath as in 
> below task definition.  I ultimately want to create a classpath from a 
> string, but that is next question, if I can get this working.  This is 
> the same path I am using in my commandline javac call
> 
> 
>         <!-- Compile Classes -->
>         <target name="compile" depends="init, prepare" description="Compile the classes">
>                 <property name="myclasspath" refid="test.classpath"/>
>                     <echo message="myclasspath= ${myclasspath}"/>
>                 <javac srcdir="${src.paths}"
>                        failonerror="true"
>                        includeantruntime="false"
>                        destdir="${build.dir}/classes"
>                         debug="${javac.debug}"
>                        debuglevel="${javac.debuglevel}"
>                        verbose="true"
>                        memoryMaximumSize="${javac.memoryMaximumSize}"
>                      fork="yes"
>                      executable="/opt/local/software/websphere/v7/java/bin/javac"
>                        source="1.6"
>                        target="1.6">
>             <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
>                 </javac>
>         </target>
> 
> 
> Commandline javac call
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d 
> /home/ab/antcode/build/classes -classpath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-I
> NF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/
> v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 
> -g:none -source 1.6 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/event/*.java 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/vo/*.java > commandline.log 2>&1
> 
> 
> Thanks for any help you can provide.
> 
> -----Original Message-----
> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
> Sent: Tuesday, January 15, 2013 3:41 PM
> To: Ant Users List
> Subject: Re: Which javac does ant use in its "javac" task?
> 
> Without knowing how you are creating the classpath for ant to use, it is impossible to say why it is not working for you.  It may be something as simple as using the wildcard in a way that has ant expanding it rather than it being passed through to javac.
> 
> Maury
> 
> 
> On 01/14/13 17:23, WebServices Development wrote:
> > I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
> >
> > When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
> >
> > In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
> >
> > In ANT execution, it does not expand the list, so the compile fails.
> >
> >  From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
> >
> > So, the questions I have are
> >
> > -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
> >
> > -  What role does JAVA_HOME play when using ANT?
> >
> > -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
> >
> >
> > Thank you
> >
> >
> >
> >
> >
> >
> > -----------------------------------------
> > This email transmission and any accompanying attachments may contain 
> > CSX privileged and confidential information intended only for the 
> > use of the intended addressee.  Any dissemination, distribution, 
> > copying or action taken in reliance on the contents of this email by 
> > anyone other than the intended recipient is strictly prohibited.  If 
> > you have received this email in error please immediately delete it 
> > and  notify sender at the above CSX email address.  Sender and CSX 
> > accept no liability for any damage caused directly or indirectly by 
> > receipt of this email.
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: 
> > user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.o
> > rg> For additional commands, e-mail: 
> > user-help@ant.apache.org<ma...@ant.apache.org>
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: 
> user-help@ant.apache.org<ma...@ant.apache.org>
> 
> 
 		 	   		  

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Which javac does ant use in its "javac" task?

Posted by WebServices Development <We...@csx.com>.
Thank you.  I presume this is answer to my first question - Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?  Is this javac class a java compiler class, or just a class that defines ANT's javac task ?   If it is a compiler, then does it mean that ANT's javac is having trouble dealing with wildcard classpaths then?

Then, What role does JAVA_HOME play when using ANT?

Thanks again.

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Tuesday, January 15, 2013 7:00 PM
To: Ant Users List
Subject: RE: Which javac does ant use in its "javac" task?


you will find a javac key in .\org\apache\ant\taskdefs\default.propertiesjavac=org.apache.tools.ant.taskdefs.Javac defaults.properties is wholly contained within ant.jar inside $ANT_HOME\lib\ant.jar

Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

 > From: WebServices_Development@csx.com
> To: user@ant.apache.org
> Subject: RE: Which javac does ant use in its "javac" task?
> Date: Tue, 15 Jan 2013 23:38:40 +0000
> 
> Sorry, there was a typo on javac call classpath.  It should have been
> 
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d 
> /home/ab/antcode/build/classes -classpath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/
> lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/
> lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 
> -g:none -source 1.6 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/event/*.java 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/vo/*.java > commandline.log 2>&1
> 
> 
> Command line
> -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*:
> 
> 
> Ant
> 
> <classpath 
> path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WE
> B-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software
> /websphere/v7/plugins/*"/>
> 
> 
> 
> _____________________________________________
> From: WebServices Development
> Sent: Tuesday, January 15, 2013 6:06 PM
> To: Ant Users List
> Subject: RE: Which javac does ant use in its "javac" task?
> 
> 
> Actually, currently I am testing with hardcoding the classpath as in 
> below task definition.  I ultimately want to create a classpath from a 
> string, but that is next question, if I can get this working.  This is 
> the same path I am using in my commandline javac call
> 
> 
>         <!-- Compile Classes -->
>         <target name="compile" depends="init, prepare" description="Compile the classes">
>                 <property name="myclasspath" refid="test.classpath"/>
>                     <echo message="myclasspath= ${myclasspath}"/>
>                 <javac srcdir="${src.paths}"
>                        failonerror="true"
>                        includeantruntime="false"
>                        destdir="${build.dir}/classes"
>                         debug="${javac.debug}"
>                        debuglevel="${javac.debuglevel}"
>                        verbose="true"
>                        memoryMaximumSize="${javac.memoryMaximumSize}"
>                      fork="yes"
>                      executable="/opt/local/software/websphere/v7/java/bin/javac"
>                        source="1.6"
>                        target="1.6">
>             <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
>                 </javac>
>         </target>
> 
> 
> Commandline javac call
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d 
> /home/ab/antcode/build/classes -classpath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-I
> NF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/
> v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 
> -g:none -source 1.6 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/event/*.java 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/vo/*.java > commandline.log 2>&1
> 
> 
> Thanks for any help you can provide.
> 
> -----Original Message-----
> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
> Sent: Tuesday, January 15, 2013 3:41 PM
> To: Ant Users List
> Subject: Re: Which javac does ant use in its "javac" task?
> 
> Without knowing how you are creating the classpath for ant to use, it is impossible to say why it is not working for you.  It may be something as simple as using the wildcard in a way that has ant expanding it rather than it being passed through to javac.
> 
> Maury
> 
> 
> On 01/14/13 17:23, WebServices Development wrote:
> > I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
> >
> > When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
> >
> > In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
> >
> > In ANT execution, it does not expand the list, so the compile fails.
> >
> >  From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
> >
> > So, the questions I have are
> >
> > -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
> >
> > -  What role does JAVA_HOME play when using ANT?
> >
> > -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
> >
> >
> > Thank you
> >
> >
> >
> >
> >
> >
> > -----------------------------------------
> > This email transmission and any accompanying attachments may contain 
> > CSX privileged and confidential information intended only for the 
> > use of the intended addressee.  Any dissemination, distribution, 
> > copying or action taken in reliance on the contents of this email by 
> > anyone other than the intended recipient is strictly prohibited.  If 
> > you have received this email in error please immediately delete it 
> > and  notify sender at the above CSX email address.  Sender and CSX 
> > accept no liability for any damage caused directly or indirectly by 
> > receipt of this email.
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: 
> > user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.o
> > rg> For additional commands, e-mail: 
> > user-help@ant.apache.org<ma...@ant.apache.org>
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: 
> user-help@ant.apache.org<ma...@ant.apache.org>
> 
> 
 		 	   		  

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Which javac does ant use in its "javac" task?

Posted by Martin Gainty <mg...@hotmail.com>.
you will find a javac key in .\org\apache\ant\taskdefs\default.propertiesjavac=org.apache.tools.ant.taskdefs.Javac defaults.properties is wholly contained within ant.jar inside
$ANT_HOME\lib\ant.jar

Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

 > From: WebServices_Development@csx.com
> To: user@ant.apache.org
> Subject: RE: Which javac does ant use in its "javac" task?
> Date: Tue, 15 Jan 2013 23:38:40 +0000
> 
> Sorry, there was a typo on javac call classpath.  It should have been
> 
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d /home/ab/antcode/build/classes -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 -g:none -source 1.6 /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/event/*.java /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/vo/*.java > commandline.log 2>&1
> 
> 
> Command line
> -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*:
> 
> 
> Ant
> 
> <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
> 
> 
> 
> _____________________________________________
> From: WebServices Development
> Sent: Tuesday, January 15, 2013 6:06 PM
> To: Ant Users List
> Subject: RE: Which javac does ant use in its "javac" task?
> 
> 
> Actually, currently I am testing with hardcoding the classpath as in below task definition.  I ultimately want to create a classpath from a string, but that is next question, if I can get this working.  This is the same path I am using in my commandline javac call
> 
> 
>         <!-- Compile Classes -->
>         <target name="compile" depends="init, prepare" description="Compile the classes">
>                 <property name="myclasspath" refid="test.classpath"/>
>                     <echo message="myclasspath= ${myclasspath}"/>
>                 <javac srcdir="${src.paths}"
>                        failonerror="true"
>                        includeantruntime="false"
>                        destdir="${build.dir}/classes"
>                         debug="${javac.debug}"
>                        debuglevel="${javac.debuglevel}"
>                        verbose="true"
>                        memoryMaximumSize="${javac.memoryMaximumSize}"
>                      fork="yes"
>                      executable="/opt/local/software/websphere/v7/java/bin/javac"
>                        source="1.6"
>                        target="1.6">
>             <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
>                 </javac>
>         </target>
> 
> 
> Commandline javac call
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d /home/ab/antcode/build/classes -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 -g:none -source 1.6 /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/event/*.java /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/vo/*.java > commandline.log 2>&1
> 
> 
> Thanks for any help you can provide.
> 
> -----Original Message-----
> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
> Sent: Tuesday, January 15, 2013 3:41 PM
> To: Ant Users List
> Subject: Re: Which javac does ant use in its "javac" task?
> 
> Without knowing how you are creating the classpath for ant to use, it is impossible to say why it is not working for you.  It may be something as simple as using the wildcard in a way that has ant expanding it rather than it being passed through to javac.
> 
> Maury
> 
> 
> On 01/14/13 17:23, WebServices Development wrote:
> > I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
> >
> > When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
> >
> > In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
> >
> > In ANT execution, it does not expand the list, so the compile fails.
> >
> >  From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
> >
> > So, the questions I have are
> >
> > -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
> >
> > -  What role does JAVA_HOME play when using ANT?
> >
> > -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
> >
> >
> > Thank you
> >
> >
> >
> >
> >
> >
> > -----------------------------------------
> > This email transmission and any accompanying attachments may contain
> > CSX privileged and confidential information intended only for the use
> > of the intended addressee.  Any dissemination, distribution, copying
> > or action taken in reliance on the contents of this email by anyone
> > other than the intended recipient is strictly prohibited.  If you have
> > received this email in error please immediately delete it and  notify
> > sender at the above CSX email address.  Sender and CSX accept no
> > liability for any damage caused directly or indirectly by receipt of
> > this email.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org<ma...@ant.apache.org> For additional
> > commands, e-mail: user-help@ant.apache.org<ma...@ant.apache.org>
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org<ma...@ant.apache.org> For additional commands, e-mail: user-help@ant.apache.org<ma...@ant.apache.org>
> 
> 
 		 	   		  

RE: Which javac does ant use in its "javac" task?

Posted by WebServices Development <We...@csx.com>.
Yes, I have done it and I get the following error.  I indicates something is happening in the Javac class in taskdefs.  I would like to debug into ant code when running but do not know how to do it.  Is it possible to put a breakpoint in ANT source when testing it from RAD / Eclipse?

BUILD FAILED
C:\RAD85_WS\Enterprise_Svcs4\PyDevBuild\JDK6ClasspathANT.xml:212: Compile failed; see the compiler error output for details.

	at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1174)
	at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:930)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:392)
	at org.apache.tools.ant.Target.performTasks(Target.java:413)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
	at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)



Also, my observation is when it doesn't work, the following also doesn't show expanded classpath whereas when I do it from command line the '*' are expanded
[search path for class files: C:\Software\JDK7\jre\lib\resources.jar,C:\Software\JDK7\jre\lib\rt.jar,C:\Software\JDK7\jre\lib\sunrsasign.jar,C:\Software\JDK7\jre\lib\jsse.jar,C:\Software\JDK7\jre\lib\jce.jar,C:\Software\JDK7\jre\lib\charsets.jar,C:\Software\JDK7\jre\lib\jfr.jar,C:\Software\JDK7\jre\classes,C:\Software\JDK7\jre\lib\ext\dnsns.jar,C:\Software\JDK7\jre\lib\ext\localedata.jar,C:\Software\JDK7\jre\lib\ext\sunec.jar,C:\Software\JDK7\jre\lib\ext\sunjce_provider.jar,C:\Software\JDK7\jre\lib\ext\sunmscapi.jar,C:\Software\JDK7\jre\lib\ext\zipfs.jar,C:\temp\build\classes,C:\CCView\B3601_en_P0005147_UITemplate\enterprise_ui\RAD8ProjectsWAS7Server\CSXStarterWeb\WebContent\WEB-INF\lib\*,C:\Software\WAS85\lib\*,C:\Software\WAS85\plugins\*]

-----Original Message-----
From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com] 
Sent: Wednesday, January 16, 2013 1:23 PM
To: Ant Users List
Subject: Re: Which javac does ant use in its "javac" task?

You may have already done this, but at this point I'd say run ant in fully verbose, debug mode and see if anything shows up that indicates what it going on.  Sorry I couldn't provide more help.

Maury


On 01/16/13 01:33, WebServices Development wrote:
> Thank you Maury.
>
> I made the change and tested it on both linux and windows.  It did not 
> work in both environments.  Actually, in my various trials, I had 
> tried this one also before, but it doesn't work.  It seems, ANT is not 
> parsing it correctly
>
>
> -----Original Message-----
> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
> Sent: Tuesday, January 15, 2013 20:57
> To: Ant Users List
> Subject: Re: Which javac does ant use in its "javac" task?
>
> According to the Ant 1.8.4 docs, wildcards are only supported in the 'location' attribute of a pathelement or a classpath.  Based on this, your classpath element should be:
>
> <classpath>
>     <pathelement location="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*"/>
>     <pathelement location="/opt/local/software/websphere/v7/lib/*"/>
>     <pathelement 
> location="/opt/local/software/websphere/v7/plugins/*"/>
> </classpath>
>
> Maury
>
>
> On 01/15/13 15:38, WebServices Development wrote:
>> Sorry, there was a typo on javac call classpath.  It should have been
>>
>> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
>> export JAVA_HOME
>> JDK_HOME=/opt/local/software/websphere/v7/java
>> export JDK_HOME
>> /opt/local/software/websphere/v7/java/bin/javac -verbose -d 
>> /home/ab/antcode/build/classes -classpath 
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF
>> / 
>> lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7
>> /
>> lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath 
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 
>> -g:none -source 1.6 
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxSta
>> r
>> ter/event/*.java
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
>> ter/vo/*.java>   commandline.log 2>&1
>>
>>
>> Command line
>> -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*:
>>
>>
>> Ant
>>
>> <classpath
>> path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/W
>> E 
>> B-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/softwar
>> e
>> /websphere/v7/plugins/*"/>
>>
>>
>>
>> _____________________________________________
>> From: WebServices Development
>> Sent: Tuesday, January 15, 2013 6:06 PM
>> To: Ant Users List
>> Subject: RE: Which javac does ant use in its "javac" task?
>>
>>
>> Actually, currently I am testing with hardcoding the classpath as in 
>> below task definition.  I ultimately want to create a classpath from 
>> a string, but that is next question, if I can get this working.  This 
>> is the same path I am using in my commandline javac call
>>
>>
>>           <!-- Compile Classes -->
>>           <target name="compile" depends="init, prepare" description="Compile the classes">
>>                   <property name="myclasspath" refid="test.classpath"/>
>>                       <echo message="myclasspath= ${myclasspath}"/>
>>                   <javac srcdir="${src.paths}"
>>                          failonerror="true"
>>                          includeantruntime="false"
>>                          destdir="${build.dir}/classes"
>>                           debug="${javac.debug}"
>>                          debuglevel="${javac.debuglevel}"
>>                          verbose="true"
>>                          memoryMaximumSize="${javac.memoryMaximumSize}"
>>                        fork="yes"
>>                        executable="/opt/local/software/websphere/v7/java/bin/javac"
>>                          source="1.6"
>>                          target="1.6">
>>               <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
>>                   </javac>
>>           </target>
>>
>>
>> Commandline javac call
>> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
>> export JAVA_HOME
>> JDK_HOME=/opt/local/software/websphere/v7/java
>> export JDK_HOME
>> /opt/local/software/websphere/v7/java/bin/javac -verbose -d 
>> /home/ab/antcode/build/classes -classpath 
>> /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-
>> I 
>> NF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere
>> /
>> v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath 
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 
>> -g:none -source 1.6 
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxSta
>> r
>> ter/event/*.java
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
>> ter/vo/*.java>   commandline.log 2>&1
>>
>>
>> Thanks for any help you can provide.
>>
>> -----Original Message-----
>> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
>> Sent: Tuesday, January 15, 2013 3:41 PM
>> To: Ant Users List
>> Subject: Re: Which javac does ant use in its "javac" task?
>>
>> Without knowing how you are creating the classpath for ant to use, it is impossible to say why it is not working for you.  It may be something as simple as using the wildcard in a way that has ant expanding it rather than it being passed through to javac.
>>
>> Maury
>>
>>
>> On 01/14/13 17:23, WebServices Development wrote:
>>> I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
>>>
>>> When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
>>>
>>> In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
>>>
>>> In ANT execution, it does not expand the list, so the compile fails.
>>>
>>>    From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
>>>
>>> So, the questions I have are
>>>
>>> -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
>>>
>>> -  What role does JAVA_HOME play when using ANT?
>>>
>>> -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
>>>
>>>
>>> Thank you
>>>
>>>
>>>
>>>
>>>
>>>
>>> -----------------------------------------
>>> This email transmission and any accompanying attachments may contain 
>>> CSX privileged and confidential information intended only for the 
>>> use of the intended addressee.  Any dissemination, distribution, 
>>> copying or action taken in reliance on the contents of this email by 
>>> anyone other than the intended recipient is strictly prohibited.  If 
>>> you have received this email in error please immediately delete it 
>>> and notify sender at the above CSX email address.  Sender and CSX 
>>> accept no liability for any damage caused directly or indirectly by 
>>> receipt of this email.
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail:
>>> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.o
>>> r
>>> g>   For additional commands, e-mail:
>>> user-help@ant.apache.org<ma...@ant.apache.org>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.or
>> g
>>>   For additional commands, e-mail:
>> user-help@ant.apache.org<ma...@ant.apache.org>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
> commands, e-mail: user-help@ant.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
> commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Re: Which javac does ant use in its "javac" task?

Posted by Rainer Noack <ra...@noacks.net>.
Hi, just for your understanding:
Ant's javac task is not a compiler itself, but calls the specified 
compiler (if not specified otherwise, the javac of the jdk you are 
running ant with.)
BUT: In the most cases Ant is passing a resolved classpath to the compiler.
Regarding the specified order of the classpath elements, this works as 
expected.
However, there is a trap, you can run into:
Ant resolves the Path and it's elements at Parsing-Time and removes 
entries that are obsolete at this time.
If you expect something in your classpath, that is not there when you 
start Ant (f.e. something you have generated or copied in the prepare 
target)
you will fail.
There are some workarounds. easiest ist split the build with an <ant> or 
<antcall> task.

cheers
rainer



Am 16.01.2013 19:23, schrieb Maurice Feskanich:
> You may have already done this, but at this point I'd say run ant in 
> fully verbose, debug mode and see if anything shows up that indicates 
> what it going on.  Sorry I couldn't provide more help.
>
> Maury
>
>
> On 01/16/13 01:33, WebServices Development wrote:
>> Thank you Maury.
>>
>> I made the change and tested it on both linux and windows.  It did 
>> not work in both environments.  Actually, in my various trials, I had 
>> tried this one also before, but it doesn't work. It seems, ANT is not 
>> parsing it correctly
>>
>>
>> -----Original Message-----
>> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
>> Sent: Tuesday, January 15, 2013 20:57
>> To: Ant Users List
>> Subject: Re: Which javac does ant use in its "javac" task?
>>
>> According to the Ant 1.8.4 docs, wildcards are only supported in the 
>> 'location' attribute of a pathelement or a classpath.  Based on this, 
>> your classpath element should be:
>>
>> <classpath>
>>     <pathelement 
>> location="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*"/>
>>     <pathelement location="/opt/local/software/websphere/v7/lib/*"/>
>>     <pathelement location="/opt/local/software/websphere/v7/plugins/*"/>
>> </classpath>
>>
>> Maury
>>
>>
>> On 01/15/13 15:38, WebServices Development wrote:
>>> Sorry, there was a typo on javac call classpath.  It should have been
>>>
>>> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
>>> export JAVA_HOME
>>> JDK_HOME=/opt/local/software/websphere/v7/java
>>> export JDK_HOME
>>> /opt/local/software/websphere/v7/java/bin/javac -verbose -d
>>> /home/ab/antcode/build/classes -classpath
>>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/
>>> lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/
>>> lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath
>>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6
>>> -g:none -source 1.6
>>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
>>> ter/event/*.java
>>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
>>> ter/vo/*.java>   commandline.log 2>&1
>>>
>>>
>>> Command line
>>> -classpath 
>>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*:
>>>
>>>
>>> Ant
>>>
>>> <classpath
>>> path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WE
>>> B-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software
>>> /websphere/v7/plugins/*"/>
>>>
>>>
>>>
>>> _____________________________________________
>>> From: WebServices Development
>>> Sent: Tuesday, January 15, 2013 6:06 PM
>>> To: Ant Users List
>>> Subject: RE: Which javac does ant use in its "javac" task?
>>>
>>>
>>> Actually, currently I am testing with hardcoding the classpath as in
>>> below task definition.  I ultimately want to create a classpath from a
>>> string, but that is next question, if I can get this working. This is
>>> the same path I am using in my commandline javac call
>>>
>>>
>>>           <!-- Compile Classes -->
>>>           <target name="compile" depends="init, prepare" 
>>> description="Compile the classes">
>>>                   <property name="myclasspath" refid="test.classpath"/>
>>>                       <echo message="myclasspath= ${myclasspath}"/>
>>>                   <javac srcdir="${src.paths}"
>>>                          failonerror="true"
>>>                          includeantruntime="false"
>>>                          destdir="${build.dir}/classes"
>>>                           debug="${javac.debug}"
>>>                          debuglevel="${javac.debuglevel}"
>>>                          verbose="true"
>>> memoryMaximumSize="${javac.memoryMaximumSize}"
>>>                        fork="yes"
>>> executable="/opt/local/software/websphere/v7/java/bin/javac"
>>>                          source="1.6"
>>>                          target="1.6">
>>>               <classpath 
>>> path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
>>>                   </javac>
>>>           </target>
>>>
>>>
>>> Commandline javac call
>>> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
>>> export JAVA_HOME
>>> JDK_HOME=/opt/local/software/websphere/v7/java
>>> export JDK_HOME
>>> /opt/local/software/websphere/v7/java/bin/javac -verbose -d
>>> /home/ab/antcode/build/classes -classpath
>>> /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-I
>>> NF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/
>>> v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath
>>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6
>>> -g:none -source 1.6
>>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
>>> ter/event/*.java
>>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
>>> ter/vo/*.java>   commandline.log 2>&1
>>>
>>>
>>> Thanks for any help you can provide.
>>>
>>> -----Original Message-----
>>> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
>>> Sent: Tuesday, January 15, 2013 3:41 PM
>>> To: Ant Users List
>>> Subject: Re: Which javac does ant use in its "javac" task?
>>>
>>> Without knowing how you are creating the classpath for ant to use, 
>>> it is impossible to say why it is not working for you. It may be 
>>> something as simple as using the wildcard in a way that has ant 
>>> expanding it rather than it being passed through to javac.
>>>
>>> Maury
>>>
>>>
>>> On 01/14/13 17:23, WebServices Development wrote:
>>>> I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 
>>>> 7.  I have a set of classes that use a list of jars from a given 
>>>> library location.
>>>>
>>>> When I use command line jdk to do the compile it gives different 
>>>> results from using ant script to do the compile. The classpath 
>>>> definition is same in both cases.
>>>>
>>>> In the command line execution, it expands the wildcard classpath 
>>>> that is introduced in JDK 6.
>>>>
>>>> In ANT execution, it does not expand the list, so the compile fails.
>>>>
>>>>    From what I have read, ANT is supposed to support wildcard 
>>>> classpaths with version 1.8.2 and I am on version 1.8.4.
>>>>
>>>> So, the questions I have are
>>>>
>>>> -  Which javac does ant use? Is it in the ANT code that doesn't 
>>>> process the wildcard classpath?
>>>>
>>>> -  What role does JAVA_HOME play when using ANT?
>>>>
>>>> -  How can I resolve the issue, so I can use ANT with wildcard 
>>>> classpath ?
>>>>
>>>>
>>>> Thank you
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----------------------------------------
>>>> This email transmission and any accompanying attachments may contain
>>>> CSX privileged and confidential information intended only for the use
>>>> of the intended addressee.  Any dissemination, distribution, copying
>>>> or action taken in reliance on the contents of this email by anyone
>>>> other than the intended recipient is strictly prohibited. If you
>>>> have received this email in error please immediately delete it and
>>>> notify sender at the above CSX email address.  Sender and CSX accept
>>>> no liability for any damage caused directly or indirectly by receipt
>>>> of this email.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:
>>>> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.or
>>>> g>   For additional commands, e-mail:
>>>> user-help@ant.apache.org<ma...@ant.apache.org>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.org
>>>>   For additional commands, e-mail:
>>> user-help@ant.apache.org<ma...@ant.apache.org>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
>> additional commands, e-mail: user-help@ant.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Which javac does ant use in its "javac" task?

Posted by Maurice Feskanich <ma...@oracle.com>.
You may have already done this, but at this point I'd say run ant in 
fully verbose, debug mode and see if anything shows up that indicates 
what it going on.  Sorry I couldn't provide more help.

Maury


On 01/16/13 01:33, WebServices Development wrote:
> Thank you Maury.
>
> I made the change and tested it on both linux and windows.  It did not work in both environments.  Actually, in my various trials, I had tried this one also before, but it doesn't work.  It seems, ANT is not parsing it correctly
>
>
> -----Original Message-----
> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
> Sent: Tuesday, January 15, 2013 20:57
> To: Ant Users List
> Subject: Re: Which javac does ant use in its "javac" task?
>
> According to the Ant 1.8.4 docs, wildcards are only supported in the 'location' attribute of a pathelement or a classpath.  Based on this, your classpath element should be:
>
> <classpath>
>     <pathelement location="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*"/>
>     <pathelement location="/opt/local/software/websphere/v7/lib/*"/>
>     <pathelement location="/opt/local/software/websphere/v7/plugins/*"/>
> </classpath>
>
> Maury
>
>
> On 01/15/13 15:38, WebServices Development wrote:
>> Sorry, there was a typo on javac call classpath.  It should have been
>>
>> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
>> export JAVA_HOME
>> JDK_HOME=/opt/local/software/websphere/v7/java
>> export JDK_HOME
>> /opt/local/software/websphere/v7/java/bin/javac -verbose -d
>> /home/ab/antcode/build/classes -classpath
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/
>> lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/
>> lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6
>> -g:none -source 1.6
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
>> ter/event/*.java
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
>> ter/vo/*.java>   commandline.log 2>&1
>>
>>
>> Command line
>> -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*:
>>
>>
>> Ant
>>
>> <classpath
>> path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WE
>> B-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software
>> /websphere/v7/plugins/*"/>
>>
>>
>>
>> _____________________________________________
>> From: WebServices Development
>> Sent: Tuesday, January 15, 2013 6:06 PM
>> To: Ant Users List
>> Subject: RE: Which javac does ant use in its "javac" task?
>>
>>
>> Actually, currently I am testing with hardcoding the classpath as in
>> below task definition.  I ultimately want to create a classpath from a
>> string, but that is next question, if I can get this working.  This is
>> the same path I am using in my commandline javac call
>>
>>
>>           <!-- Compile Classes -->
>>           <target name="compile" depends="init, prepare" description="Compile the classes">
>>                   <property name="myclasspath" refid="test.classpath"/>
>>                       <echo message="myclasspath= ${myclasspath}"/>
>>                   <javac srcdir="${src.paths}"
>>                          failonerror="true"
>>                          includeantruntime="false"
>>                          destdir="${build.dir}/classes"
>>                           debug="${javac.debug}"
>>                          debuglevel="${javac.debuglevel}"
>>                          verbose="true"
>>                          memoryMaximumSize="${javac.memoryMaximumSize}"
>>                        fork="yes"
>>                        executable="/opt/local/software/websphere/v7/java/bin/javac"
>>                          source="1.6"
>>                          target="1.6">
>>               <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
>>                   </javac>
>>           </target>
>>
>>
>> Commandline javac call
>> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
>> export JAVA_HOME
>> JDK_HOME=/opt/local/software/websphere/v7/java
>> export JDK_HOME
>> /opt/local/software/websphere/v7/java/bin/javac -verbose -d
>> /home/ab/antcode/build/classes -classpath
>> /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-I
>> NF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/
>> v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6
>> -g:none -source 1.6
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
>> ter/event/*.java
>> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
>> ter/vo/*.java>   commandline.log 2>&1
>>
>>
>> Thanks for any help you can provide.
>>
>> -----Original Message-----
>> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
>> Sent: Tuesday, January 15, 2013 3:41 PM
>> To: Ant Users List
>> Subject: Re: Which javac does ant use in its "javac" task?
>>
>> Without knowing how you are creating the classpath for ant to use, it is impossible to say why it is not working for you.  It may be something as simple as using the wildcard in a way that has ant expanding it rather than it being passed through to javac.
>>
>> Maury
>>
>>
>> On 01/14/13 17:23, WebServices Development wrote:
>>> I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
>>>
>>> When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
>>>
>>> In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
>>>
>>> In ANT execution, it does not expand the list, so the compile fails.
>>>
>>>    From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
>>>
>>> So, the questions I have are
>>>
>>> -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
>>>
>>> -  What role does JAVA_HOME play when using ANT?
>>>
>>> -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
>>>
>>>
>>> Thank you
>>>
>>>
>>>
>>>
>>>
>>>
>>> -----------------------------------------
>>> This email transmission and any accompanying attachments may contain
>>> CSX privileged and confidential information intended only for the use
>>> of the intended addressee.  Any dissemination, distribution, copying
>>> or action taken in reliance on the contents of this email by anyone
>>> other than the intended recipient is strictly prohibited.  If you
>>> have received this email in error please immediately delete it and
>>> notify sender at the above CSX email address.  Sender and CSX accept
>>> no liability for any damage caused directly or indirectly by receipt
>>> of this email.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.or
>>> g>   For additional commands, e-mail:
>>> user-help@ant.apache.org<ma...@ant.apache.org>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.org
>>>   For additional commands, e-mail:
>> user-help@ant.apache.org<ma...@ant.apache.org>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Which javac does ant use in its "javac" task?

Posted by WebServices Development <We...@csx.com>.
Thank you Maury.

I made the change and tested it on both linux and windows.  It did not work in both environments.  Actually, in my various trials, I had tried this one also before, but it doesn't work.  It seems, ANT is not parsing it correctly


-----Original Message-----
From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com] 
Sent: Tuesday, January 15, 2013 20:57
To: Ant Users List
Subject: Re: Which javac does ant use in its "javac" task?

According to the Ant 1.8.4 docs, wildcards are only supported in the 'location' attribute of a pathelement or a classpath.  Based on this, your classpath element should be:

<classpath>
   <pathelement location="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*"/>
   <pathelement location="/opt/local/software/websphere/v7/lib/*"/>
   <pathelement location="/opt/local/software/websphere/v7/plugins/*"/>
</classpath>

Maury


On 01/15/13 15:38, WebServices Development wrote:
> Sorry, there was a typo on javac call classpath.  It should have been
>
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d 
> /home/ab/antcode/build/classes -classpath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/
> lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/
> lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 
> -g:none -source 1.6 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/event/*.java 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/vo/*.java>  commandline.log 2>&1
>
>
> Command line
> -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*:
>
>
> Ant
>
> <classpath 
> path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WE
> B-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software
> /websphere/v7/plugins/*"/>
>
>
>
> _____________________________________________
> From: WebServices Development
> Sent: Tuesday, January 15, 2013 6:06 PM
> To: Ant Users List
> Subject: RE: Which javac does ant use in its "javac" task?
>
>
> Actually, currently I am testing with hardcoding the classpath as in 
> below task definition.  I ultimately want to create a classpath from a 
> string, but that is next question, if I can get this working.  This is 
> the same path I am using in my commandline javac call
>
>
>          <!-- Compile Classes -->
>          <target name="compile" depends="init, prepare" description="Compile the classes">
>                  <property name="myclasspath" refid="test.classpath"/>
>                      <echo message="myclasspath= ${myclasspath}"/>
>                  <javac srcdir="${src.paths}"
>                         failonerror="true"
>                         includeantruntime="false"
>                         destdir="${build.dir}/classes"
>                          debug="${javac.debug}"
>                         debuglevel="${javac.debuglevel}"
>                         verbose="true"
>                         memoryMaximumSize="${javac.memoryMaximumSize}"
>                       fork="yes"
>                       executable="/opt/local/software/websphere/v7/java/bin/javac"
>                         source="1.6"
>                         target="1.6">
>              <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
>                  </javac>
>          </target>
>
>
> Commandline javac call
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d 
> /home/ab/antcode/build/classes -classpath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-I
> NF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/
> v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 
> -g:none -source 1.6 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/event/*.java 
> /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStar
> ter/vo/*.java>  commandline.log 2>&1
>
>
> Thanks for any help you can provide.
>
> -----Original Message-----
> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
> Sent: Tuesday, January 15, 2013 3:41 PM
> To: Ant Users List
> Subject: Re: Which javac does ant use in its "javac" task?
>
> Without knowing how you are creating the classpath for ant to use, it is impossible to say why it is not working for you.  It may be something as simple as using the wildcard in a way that has ant expanding it rather than it being passed through to javac.
>
> Maury
>
>
> On 01/14/13 17:23, WebServices Development wrote:
>> I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
>>
>> When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
>>
>> In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
>>
>> In ANT execution, it does not expand the list, so the compile fails.
>>
>>   From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
>>
>> So, the questions I have are
>>
>> -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
>>
>> -  What role does JAVA_HOME play when using ANT?
>>
>> -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
>>
>>
>> Thank you
>>
>>
>>
>>
>>
>>
>> -----------------------------------------
>> This email transmission and any accompanying attachments may contain 
>> CSX privileged and confidential information intended only for the use 
>> of the intended addressee.  Any dissemination, distribution, copying 
>> or action taken in reliance on the contents of this email by anyone 
>> other than the intended recipient is strictly prohibited.  If you 
>> have received this email in error please immediately delete it and  
>> notify sender at the above CSX email address.  Sender and CSX accept 
>> no liability for any damage caused directly or indirectly by receipt 
>> of this email.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: 
>> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.or
>> g>  For additional commands, e-mail: 
>> user-help@ant.apache.org<ma...@ant.apache.org>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> user-unsubscribe@ant.apache.org<mailto:user-unsubscribe@ant.apache.org
> >  For additional commands, e-mail: 
> user-help@ant.apache.org<ma...@ant.apache.org>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org


Re: Which javac does ant use in its "javac" task?

Posted by Maurice Feskanich <ma...@oracle.com>.
According to the Ant 1.8.4 docs, wildcards are only supported in the 
'location' attribute of a pathelement or a classpath.  Based on this, 
your classpath element should be:

<classpath>
   <pathelement location="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*"/>
   <pathelement location="/opt/local/software/websphere/v7/lib/*"/>
   <pathelement location="/opt/local/software/websphere/v7/plugins/*"/>
</classpath>

Maury


On 01/15/13 15:38, WebServices Development wrote:
> Sorry, there was a typo on javac call classpath.  It should have been
>
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d /home/ab/antcode/build/classes -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 -g:none -source 1.6 /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/event/*.java /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/vo/*.java>  commandline.log 2>&1
>
>
> Command line
> -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*:
>
>
> Ant
>
> <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
>
>
>
> _____________________________________________
> From: WebServices Development
> Sent: Tuesday, January 15, 2013 6:06 PM
> To: Ant Users List
> Subject: RE: Which javac does ant use in its "javac" task?
>
>
> Actually, currently I am testing with hardcoding the classpath as in below task definition.  I ultimately want to create a classpath from a string, but that is next question, if I can get this working.  This is the same path I am using in my commandline javac call
>
>
>          <!-- Compile Classes -->
>          <target name="compile" depends="init, prepare" description="Compile the classes">
>                  <property name="myclasspath" refid="test.classpath"/>
>                      <echo message="myclasspath= ${myclasspath}"/>
>                  <javac srcdir="${src.paths}"
>                         failonerror="true"
>                         includeantruntime="false"
>                         destdir="${build.dir}/classes"
>                          debug="${javac.debug}"
>                         debuglevel="${javac.debuglevel}"
>                         verbose="true"
>                         memoryMaximumSize="${javac.memoryMaximumSize}"
>                       fork="yes"
>                       executable="/opt/local/software/websphere/v7/java/bin/javac"
>                         source="1.6"
>                         target="1.6">
>              <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
>                  </javac>
>          </target>
>
>
> Commandline javac call
> JAVA_HOME=/opt/local/software/websphere/v7/java/bin
> export JAVA_HOME
> JDK_HOME=/opt/local/software/websphere/v7/java
> export JDK_HOME
> /opt/local/software/websphere/v7/java/bin/javac -verbose -d /home/ab/antcode/build/classes -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 -g:none -source 1.6 /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/event/*.java /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/vo/*.java>  commandline.log 2>&1
>
>
> Thanks for any help you can provide.
>
> -----Original Message-----
> From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
> Sent: Tuesday, January 15, 2013 3:41 PM
> To: Ant Users List
> Subject: Re: Which javac does ant use in its "javac" task?
>
> Without knowing how you are creating the classpath for ant to use, it is impossible to say why it is not working for you.  It may be something as simple as using the wildcard in a way that has ant expanding it rather than it being passed through to javac.
>
> Maury
>
>
> On 01/14/13 17:23, WebServices Development wrote:
>> I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
>>
>> When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
>>
>> In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
>>
>> In ANT execution, it does not expand the list, so the compile fails.
>>
>>   From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
>>
>> So, the questions I have are
>>
>> -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
>>
>> -  What role does JAVA_HOME play when using ANT?
>>
>> -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
>>
>>
>> Thank you
>>
>>
>>
>>
>>
>>
>> -----------------------------------------
>> This email transmission and any accompanying attachments may contain
>> CSX privileged and confidential information intended only for the use
>> of the intended addressee.  Any dissemination, distribution, copying
>> or action taken in reliance on the contents of this email by anyone
>> other than the intended recipient is strictly prohibited.  If you have
>> received this email in error please immediately delete it and  notify
>> sender at the above CSX email address.  Sender and CSX accept no
>> liability for any damage caused directly or indirectly by receipt of
>> this email.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org<ma...@ant.apache.org>  For additional
>> commands, e-mail: user-help@ant.apache.org<ma...@ant.apache.org>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org<ma...@ant.apache.org>  For additional commands, e-mail: user-help@ant.apache.org<ma...@ant.apache.org>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Which javac does ant use in its "javac" task?

Posted by WebServices Development <We...@csx.com>.
Sorry, there was a typo on javac call classpath.  It should have been

JAVA_HOME=/opt/local/software/websphere/v7/java/bin
export JAVA_HOME
JDK_HOME=/opt/local/software/websphere/v7/java
export JDK_HOME
/opt/local/software/websphere/v7/java/bin/javac -verbose -d /home/ab/antcode/build/classes -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 -g:none -source 1.6 /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/event/*.java /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/vo/*.java > commandline.log 2>&1


Command line
-classpath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*:


Ant

<classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>



_____________________________________________
From: WebServices Development
Sent: Tuesday, January 15, 2013 6:06 PM
To: Ant Users List
Subject: RE: Which javac does ant use in its "javac" task?


Actually, currently I am testing with hardcoding the classpath as in below task definition.  I ultimately want to create a classpath from a string, but that is next question, if I can get this working.  This is the same path I am using in my commandline javac call


        <!-- Compile Classes -->
        <target name="compile" depends="init, prepare" description="Compile the classes">
                <property name="myclasspath" refid="test.classpath"/>
                    <echo message="myclasspath= ${myclasspath}"/>
                <javac srcdir="${src.paths}"
                       failonerror="true"
                       includeantruntime="false"
                       destdir="${build.dir}/classes"
                        debug="${javac.debug}"
                       debuglevel="${javac.debuglevel}"
                       verbose="true"
                       memoryMaximumSize="${javac.memoryMaximumSize}"
                     fork="yes"
                     executable="/opt/local/software/websphere/v7/java/bin/javac"
                       source="1.6"
                       target="1.6">
            <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
                </javac>
        </target>


Commandline javac call
JAVA_HOME=/opt/local/software/websphere/v7/java/bin
export JAVA_HOME
JDK_HOME=/opt/local/software/websphere/v7/java
export JDK_HOME
/opt/local/software/websphere/v7/java/bin/javac -verbose -d /home/ab/antcode/build/classes -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 -g:none -source 1.6 /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/event/*.java /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/vo/*.java > commandline.log 2>&1


Thanks for any help you can provide.

-----Original Message-----
From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
Sent: Tuesday, January 15, 2013 3:41 PM
To: Ant Users List
Subject: Re: Which javac does ant use in its "javac" task?

Without knowing how you are creating the classpath for ant to use, it is impossible to say why it is not working for you.  It may be something as simple as using the wildcard in a way that has ant expanding it rather than it being passed through to javac.

Maury


On 01/14/13 17:23, WebServices Development wrote:
> I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
>
> When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
>
> In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
>
> In ANT execution, it does not expand the list, so the compile fails.
>
>  From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
>
> So, the questions I have are
>
> -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
>
> -  What role does JAVA_HOME play when using ANT?
>
> -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
>
>
> Thank you
>
>
>
>
>
>
> -----------------------------------------
> This email transmission and any accompanying attachments may contain
> CSX privileged and confidential information intended only for the use
> of the intended addressee.  Any dissemination, distribution, copying
> or action taken in reliance on the contents of this email by anyone
> other than the intended recipient is strictly prohibited.  If you have
> received this email in error please immediately delete it and  notify
> sender at the above CSX email address.  Sender and CSX accept no
> liability for any damage caused directly or indirectly by receipt of
> this email.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org<ma...@ant.apache.org> For additional
> commands, e-mail: user-help@ant.apache.org<ma...@ant.apache.org>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org<ma...@ant.apache.org> For additional commands, e-mail: user-help@ant.apache.org<ma...@ant.apache.org>



RE: Which javac does ant use in its "javac" task?

Posted by WebServices Development <We...@csx.com>.
Actually, currently I am testing with hardcoding the classpath as in below task definition.  I ultimately want to create a classpath from a string, but that is next question, if I can get this working.  This is the same path I am using in my commandline javac call


        <!-- Compile Classes -->
        <target name="compile" depends="init, prepare" description="Compile the classes">
                <property name="myclasspath" refid="test.classpath"/>
                    <echo message="myclasspath= ${myclasspath}"/>
                <javac srcdir="${src.paths}"
                       failonerror="true"
                       includeantruntime="false"
                       destdir="${build.dir}/classes"
                        debug="${javac.debug}"
                       debuglevel="${javac.debuglevel}"
                       verbose="true"
                       memoryMaximumSize="${javac.memoryMaximumSize}"
                     fork="yes"
                     executable="/opt/local/software/websphere/v7/java/bin/javac"
                       source="1.6"
                       target="1.6">
            <classpath path="/home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/WebContent/WEB-INF/lib/*;/opt/local/software/websphere/v7/lib/*;/opt/local/software/websphere/v7/plugins/*"/>
                </javac>
        </target>


Commandline javac call
JAVA_HOME=/opt/local/software/websphere/v7/java/bin
export JAVA_HOME
JDK_HOME=/opt/local/software/websphere/v7/java
export JDK_HOME
/opt/local/software/websphere/v7/java/bin/javac -verbose -d /home/ab/antcode/build/classes -classpath /home/ab/antcode/RAD8ProjectsWAS7Server/CSXStarterWeb/WebContent/WEB-INF/lib/*:/home/ab/antcode/build/classes:/opt/local/software/websphere/v7/lib/*:/opt/local/software/websphere/v7/plugins/*: -sourcepath /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src -target 1.6 -g:none -source 1.6 /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/event/*.java /home/ab/antcode/RAD8ProjectsWAS7Server/StarterWeb/src/com/xxx/xxxStarter/vo/*.java > commandline.log 2>&1


Thanks for any help you can provide.

-----Original Message-----
From: Maurice Feskanich [mailto:maurice.feskanich@oracle.com]
Sent: Tuesday, January 15, 2013 3:41 PM
To: Ant Users List
Subject: Re: Which javac does ant use in its "javac" task?

Without knowing how you are creating the classpath for ant to use, it is impossible to say why it is not working for you.  It may be something as simple as using the wildcard in a way that has ant expanding it rather than it being passed through to javac.

Maury


On 01/14/13 17:23, WebServices Development wrote:
> I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
>
> When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
>
> In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
>
> In ANT execution, it does not expand the list, so the compile fails.
>
>  From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
>
> So, the questions I have are
>
> -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
>
> -  What role does JAVA_HOME play when using ANT?
>
> -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
>
>
> Thank you
>
>
>
>
>
>
> -----------------------------------------
> This email transmission and any accompanying attachments may contain
> CSX privileged and confidential information intended only for the use
> of the intended addressee.  Any dissemination, distribution, copying
> or action taken in reliance on the contents of this email by anyone
> other than the intended recipient is strictly prohibited.  If you have
> received this email in error please immediately delete it and  notify
> sender at the above CSX email address.  Sender and CSX accept no
> liability for any damage caused directly or indirectly by receipt of
> this email.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org<ma...@ant.apache.org> For additional
> commands, e-mail: user-help@ant.apache.org<ma...@ant.apache.org>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org<ma...@ant.apache.org> For additional commands, e-mail: user-help@ant.apache.org<ma...@ant.apache.org>



Re: Which javac does ant use in its "javac" task?

Posted by Maurice Feskanich <ma...@oracle.com>.
Without knowing how you are creating the classpath for ant to use, it is 
impossible to say why it is not working for you.  It may be something as 
simple as using the wildcard in a way that has ant expanding it rather 
than it being passed through to javac.

Maury


On 01/14/13 17:23, WebServices Development wrote:
> I am using ant 1.8.4.  My JAVA_HOME is set to the location of JDK 7.  I have a set of classes that use a list of jars from a given library location.
>
> When I use command line jdk to do the compile it gives different results from using ant script to do the compile.  The classpath definition is same in both cases.
>
> In the command line execution, it expands the wildcard classpath that is introduced in JDK 6.
>
> In ANT execution, it does not expand the list, so the compile fails.
>
>  From what I have read, ANT is supposed to support wildcard classpaths with version 1.8.2 and I am on version 1.8.4.
>
> So, the questions I have are
>
> -  Which javac does ant use? Is it in the ANT code that doesn't process the wildcard classpath?
>
> -  What role does JAVA_HOME play when using ANT?
>
> -  How can I resolve the issue, so I can use ANT with wildcard classpath ?
>
>
> Thank you
>
>
>
>
>
>
> -----------------------------------------
> This email transmission and any accompanying attachments may
> contain CSX privileged and confidential information intended only
> for the use of the intended addressee.  Any dissemination,
> distribution, copying or action taken in reliance on the contents
> of this email by anyone other than the intended recipient is
> strictly prohibited.  If you have received this email in error
> please immediately delete it and  notify sender at the above CSX
> email address.  Sender and CSX accept no liability for any damage
> caused directly or indirectly by receipt of this email.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org