How to set classpath when I use javax.tools.JavaCompiler compile the source?

The javax.tools.JavaCompiler#getTask() method takes an options parameter that allows to set compiler options. The following message describes an easy way to set them in order to access the calling program’s classpath: You need to configure the standard java file manager to know about the jar files(s) – you use the compiler options argument to do … Read more