-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 6
-
Component/s: tools
-
b64
-
sparc
-
solaris_10
-
Verified
When javac is invoked using jsr199, such as
javax.tools.JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
DiagnosticCollector<JavaFileObject> diagnostics =
new DiagnosticCollector<JavaFileObject>();
StandardJavaFileManager stdFileManager =
javac.getStandardFileManager(diagnostics, null, null);
stdFileManager.setLocation(StandardLocation.CLASS_PATH, cpath);
etc.
If cpath is a jar file, the jar files specified in its manifest Class-Path attribute are not included in the classpath of the Java Compilation, resulting in errors.
javax.tools.JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
DiagnosticCollector<JavaFileObject> diagnostics =
new DiagnosticCollector<JavaFileObject>();
StandardJavaFileManager stdFileManager =
javac.getStandardFileManager(diagnostics, null, null);
stdFileManager.setLocation(StandardLocation.CLASS_PATH, cpath);
etc.
If cpath is a jar file, the jar files specified in its manifest Class-Path attribute are not included in the classpath of the Java Compilation, resulting in errors.