You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Alex Valentine <al...@psu.edu> on 2004/10/04 21:57:40 UTC

Setting javac options in Ant

Just a quick questions for you folks, recently I tried out java 1.5.0
but I was having trouble building some libs for one of my apps. Becuase
the lib I was trying to compile used some old classes, I needed to add
the "-source 1.4" modifier to javac.

How would I would I add this to my compile task? When I tried 
<arg value="-source 1,4"/> 

I got an error message telling me:

/home/asv/src/java/hibernate-2.1/build.xml:157: The <javac> type doesn't
support the nested "arg" element.

-- 
/////////////////////////////////////
Alex Valentine alexvalentine@psu.edu
aim: asv108vv jabber: asv@jabber.org
/////////////////////////////////////

Re: Setting javac options in Ant

Posted by James Black <jb...@ieee.org>.
Alex Valentine wrote:

>Thanks so much, the option source="1.4" worked like a charm. There is
>one more compilier option I would like to do but I'm having trouble
>finding the correct syntax. I want to display all compilier warnings by
>doing java -Xlint but how would I add this option in my build file?
>
>  
>
  What I did was:
<java>
  <compilearg value="-Xlint:unchecked"/>
</java>

 

-- 
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black    james@usf.edu


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


Re: Setting javac options in Ant

Posted by Alex Valentine <al...@psu.edu>.
Thanks so much, the option source="1.4" worked like a charm. There is
one more compilier option I would like to do but I'm having trouble
finding the correct syntax. I want to display all compilier warnings by
doing java -Xlint but how would I add this option in my build file?

I apologize for the stupid question but I having trouble finding a
straight answer. 


On Mon, 2004-10-04 at 16:03 -0400, James Black wrote:
> Alex Valentine wrote:
> 
> >Just a quick questions for you folks, recently I tried out java 1.5.0
> >but I was having trouble building some libs for one of my apps. Becuase
> >the lib I was trying to compile used some old classes, I needed to add
> >the "-source 1.4" modifier to javac.
> >
> >How would I would I add this to my compile task? When I tried 
> ><arg value="-source 1,4"/> 
> >
> >I got an error message telling me:
> >
> >/home/asv/src/java/hibernate-2.1/build.xml:157: The <javac> type doesn't
> >support the nested "arg" element.
> >
> >  
> >
> <javac source="1.4" target="1.4"/>
> 
-- 
/////////////////////////////////////
Alex Valentine alexvalentine@psu.edu
aim: asv108vv jabber: asv@jabber.org
/////////////////////////////////////

Re: Setting javac options in Ant

Posted by James Black <jb...@ieee.org>.
Alex Valentine wrote:

>Just a quick questions for you folks, recently I tried out java 1.5.0
>but I was having trouble building some libs for one of my apps. Becuase
>the lib I was trying to compile used some old classes, I needed to add
>the "-source 1.4" modifier to javac.
>
>How would I would I add this to my compile task? When I tried 
><arg value="-source 1,4"/> 
>
>I got an error message telling me:
>
>/home/asv/src/java/hibernate-2.1/build.xml:157: The <javac> type doesn't
>support the nested "arg" element.
>
>  
>
<javac source="1.4" target="1.4"/>

-- 
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black    james@usf.edu


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