8007492: DocumentationTool cannot locate standard doclet when invoked from JRE
Reviewed-by: darcy
--- a/langtools/src/share/classes/com/sun/tools/javadoc/api/JavadocTool.java Mon Feb 04 15:30:10 2013 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/api/JavadocTool.java Mon Feb 04 18:14:24 2013 -0800
@@ -143,8 +143,9 @@
PrintWriter out_pw = new PrintWriter(out == null ? System.out : out);
try {
String standardDocletName = "com.sun.tools.doclets.standard.Standard";
+ ClassLoader cl = getClass().getClassLoader();
return com.sun.tools.javadoc.Main.execute(
- "javadoc", err_pw, err_pw, out_pw, standardDocletName, arguments);
+ "javadoc", err_pw, err_pw, out_pw, standardDocletName, cl, arguments);
} finally {
err_pw.flush();
out_pw.flush();