Details
-
Enhancement
-
Resolution: Fixed
-
P2
-
6
-
b64
-
sparc
-
solaris_10
-
Verified
Description
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.