Are you sure this is happening when JavaCPP runs, not javac? The
compiler may remove existing class files when compiling new ones, but if
it fails, it will not magically undelete them. Moreover, for that
reason, outputting files to the class path is not a good idea. The
compiler might very well load all the classes it needs from the class
path before removing anything, but that's not guaranteed. You're in
undefined behavior territory here.
Other than that, why is the output directory set to the source
directory? If someone activates the "clean" option, that will get deleted.
Samuel