Java compiled binary changes depending on the order of the source files
I am using the javac compiler and I found that it generates different resulting .class binaries depending on the order of the source files passed as a parameter. In fact, it is a matter of compiling with ANT or MAVEN, because they order the files differently.
There were differences between the two compilations. I parsed the code and I found that javac (optimizer?) Removes deprecated java jsr / ret assembly instructions from one of the compilations.
I'm wondering if this behavior is the result of "implicit" compilation: http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/javac.html#searching
-
Can anyone explain this behavior?
-
How can I generate an "idempotent" compilation process in ANT and MAVEN where the order of the source files passed to the compiler doesn't matter?
source to share