NetBeans is able to output Java source code as HTML directly from the "File" menu:
- Select a Java Source File in the "Projects" Window
- Choose: Print To HTML
- Choose Between Print To File or Print To Clipboard
The output is fairly customizable with inlined CSS.
Classic Java EE 7 Workshops: Bootstrap, Effective and Architectures, July, 13th-15th
Online workshop: Java EE 7 Bootstrap