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: [email protected] For additional commands, e-mail: [email protected]
