How does gcj resolve whether to compile .class or .java files?
GCJ compiles only the files presented to it on the command line. However, it also needs to scan other files in order to determine the layout of other classes and check for errors in your code. For these dependencies, GCJ will favour .class files if they are available because it is faster to parse a class file than source code.