1

When I run java code similar to this:

JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
...
CompilationTask task = compiler.getTask(null, javaFileManager, diagnosticCollector, null, null, Collections.singletonList(fileObject));
task.call();

A file called classlist.mf appears in my working directory.

None of my sources contain the string "classlist". I am only using the standard javax.tools api's. That file contains exactly one (of the many) classes that I generated:

org.optaplanner.core.impl.domain.common.accessor.generated.org.optaplanner.examples.common.domain.AbstractPersistable$getId

How can I prevent that classlist.mf file from appearing in my working directory?

Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120
  • 1
    Hey Geoffrey, you [posted a blog](https://www.optaplanner.org/blog/2018/01/09/JavaReflectionButMuchFaster.html) where you write `proper care needs to be taken that it doesn’t generate a classlist.mf file in the working directory`. Did you ever figure this out? If so, can you please answer your own question here? – Gili Dec 27 '18 at 18:46
  • No, I didn't figure it out (if I recall correctly). Because of this problem - and the bootstrap performance cost - I ended up going with LamdbaMetaFactory instead which is sufficient for my use case... – Geoffrey De Smet Jan 01 '19 at 15:46

0 Answers0