Reference source https://www.csync.net/blog/pc/docxdoclet/
Create a jar file with a command in cmd and output a word file.
Command format: javadoc.exe -private -encoding utf-8 -doclet doclet.docx.DocxDoclet -docletpath docxdoclet-1.0.jar -classpath docxdoclet-1.0.jar -sourcepath Source file path -file Output file .docx -font1 "Meiryo UI"- font2 "Consolas" -title Title -subtitle Title Supplement -version Version -company Publisher -copyright Copyright Footer Display Package Name
Command sample: javadoc.exe -private -encoding utf-8 -doclet doclet.docx.DocxDoclet -docletpath C: \ doxxdoclet-1.0.jar -classpath C: \ doxxdoclet-1.0.jar -sourcepath C: \ workspace \ sampleproject \ src \ -file C: \ Output file .docx -font1 "Meiryo UI" -font2 "Consolas" -title Sample system -subtitle Subsystem name -version Version 1.0 -company Publisher -copyright "Copyright c 2019 licb All Rights Reserved." C: workspace \ ... log4j \ *. java
// Insert a line break for each line
// update start
// paragraphs[i] = paragraphs[i].replaceAll("\.\s+", ".\n");
// paragraphs[i] = paragraphs[i].replaceAll("。\s*", "。\n");
paragraphs[i] = paragraphs[i].replaceAll("
", "\n");
paragraphs[i] = paragraphs[i].replaceAll("
", "\n");
paragraphs[i] = paragraphs[i].replaceAll("
Recommended Posts