What are the corresponding ant javac options for Eclipse compiler settings?

For the first three, I think all you need to tell Ant javac is debug="true" . You will get vars, lines and source by default. Specifying them explicitly is fine too.

Up vote 2 down vote favorite 1 share g+ share fb share tw.

I'm trying to get an ant build file to generate identical class files as the eclipse compiler org.eclipse.jdt.core.compiler.debug. LineNumber=generate org.eclipse.jdt.core.compiler.debug. SourceFile=generate org.eclipse.jdt.core.compiler.debug.

LocalVariable=generate org.eclipse.jdt.core.compiler.codegen. UnusedLocal=preserve The first three of which correspond (I hope! ) to debuglevel="vars,lines,source" in the javac task: What about the last one?

Java eclipse ant link|improve this question asked Nov 14 '11 at 13:54Bedwyr Humphreys4,68641647 95% accept rate.

For the first three, I think all you need to tell Ant javac is debug="true". You will get vars, lines and source by default. Specifying them explicitly is fine too.

For the last, this is particular to the Eclipse JDT compiler. I don't think other compilers optimize unused local variables away. Certainly, I've never been caught with debugger out of step due to removed unused local variables.

Are you using the JDT compiler in your Ant build using the Ant javac adapter? Unless you do, I don't think you can guarantee absolutely identical class files between the two environments. However, I would be a bit suspicious of a requirement to have such a level identical-ness.

Thanks, I'm trying to generate an ear using jenkins which is as close as possible to the ear we generate from eclipse using Export->EAR. See stackoverflow.com/questions/8091753/… – Bedwyr Humphreys Nov 14 '11 at 14:54 +1 for mentioning the Eclipse-Ant javac adapter! – Eli Acherkan Nov 14 '11 at 15:06 I've responded on that question.

I would suspect classpath rather than compiler issue. – sudocode Nov 14 '11 at 15:11 There is no particular requirement for identical class files, just trying to eliminate differences in the compilation process. BTW, updated the other question.

– Bedwyr Humphreys Nov 14 '11 at 18:07.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions