origOptions = Collections.unmodifiableMap(origOptions);
{
// Note: it might be necessary to check for an empty
// component ("") of the source path or class path
Paths paths = Paths.instance(context);
String sourceDest = options.get("-s");
if (paths.sourcePath() != null) {
for(File f: paths.sourcePath())
augmentedSourcePath += (f + File.pathSeparator);
augmentedSourcePath += (sourceDest == null)?".":sourceDest;
} else {
augmentedSourcePath = ".";
if (sourceDest != null)
augmentedSourcePath += (File.pathSeparator + sourceDest);
}
String classDest = options.get("-d");
if (paths.userClassPath() != null) {
for(File f: paths.userClassPath())
baseClassPath += (f + File.pathSeparator);
// put baseClassPath into map to handle any
// value needed for the classloader
options.put("-classpath", baseClassPath);
augmentedClassPath = baseClassPath + ((classDest == null)?".":classDest);
} else {
baseClassPath = ".";
if (classDest != null)
augmentedClassPath = baseClassPath + (File.pathSeparator + classDest);
}
assert options.get("-classpath") != null;
}
/*
* Create base and augmented class loaders
*/
ClassLoader augmentedAptCL = null;
{
/*
* Use a url class loader to look for classes on the
* user-specified class path. Prepend computed bootclass
* path, which includes extdirs, to the URLClassLoader apt
* uses.
*/
String aptclasspath = "";
Paths paths = Paths.instance(context);
String bcp = "";
Collection<File> bootclasspath = paths.bootClassPath();
if (bootclasspath != null) {
for(File f: bootclasspath)
bcp += (f + File.pathSeparator);
}