Skip to content

Tag: java-compiler-api

How to set classpath when I use compile the source?

I use the class (jdk6) to compile a source file, but the source file depends on some jar file. How to set the classpath of the Answer The 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: