ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: problem with using <arg> with the javah task
Date Thu, 15 Oct 2009 13:49:25 GMT
Bill Au wrote:
> I have a need to limit the max heap size of the javah task.  So I am using a
> <arg>:
> 
>         <javah
>           classpath="${build.classes}"
>           destdir="${build.native}/src/org/apache/hadoop/io/compress/zlib"
>       force="yes"
>           verbose="yes"
>           >
>           <arg value="-J-Xmx512m"/>
>           <class name="org.apache.hadoop.io.compress.zlib.ZlibCompressor" />
>         </javah>

> 
> When I invoke javah directly with the same argument it actually works
> without error:
> 
> javah -J-Xmx512m -classpath build/classes
> org.apache.hadoop.io.compress.zlib.ZlibCompressor
> 
> What am I doing wrong?
> 
> Bill
> 


I suspect the Main method that <javah> is calling doesn't recognise the 
-J options, because the native javah binary handles that bit early on, 
so it's getting confused.

Problem is, I don't currently see how to set memory options on <javah>; 
you'd need to tweak 
org.apache.tools.ant.taskdefs.optional.javah.SunJavah to look for -J 
options and pass them down

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


Mime
View raw message