adam bien's blog

Pretty Printing Java Source As HTML 📎

NetBeans is able to output Java source code as HTML directly from the "File" menu:

  1. Select a Java Source File in the "Projects" Window
  2. Choose: Print To HTML
  3. Choose Between Print To File or Print To Clipboard

The output is fairly customizable with inlined CSS.