How to get JavaC to maintain good class files if some input files do not work?

When compiling two independent java files with one javac call, their class files either

  • both are output to the output folder, upon successful compilation or

  • no class file is output if one source file contains some syntax or another error.

How can we get JavaC to keep a good class file?

In other words, how can we make Javac behave in the best way?

+6
source share
1 answer

I would go with:

  • Javac multiple call package
  • Use another compiler, for example, Eclipse.

As far as I can tell, failOnError will not work as a flag for javac - only if you use Ant.

+1
source

Source: https://habr.com/ru/post/906874/


All Articles