Adam Bien's Weblog

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.

NEW dates, new workshop: Java EE 7 Workshops: Bootstrap, Effective, Architectures, JavaScript Bootstrap and HTML 5 December, 7th-11th
NEW: Effective Java EE 7 -- Available For Streaming


A book about rethinking Java EE Patterns


Now if only cut and copy would automatically put an HTML flavour on the clipboard as well as plain text...

Posted by Scott on May 23, 2012 at 06:44 AM CEST #

Is this a feature of 7.1?
I can't finnd it in 7.0.1.

Posted by Shai Almog on May 23, 2012 at 11:34 AM CEST #

Nice. The old print option is ugly.

Posted by Toni Rocha on June 04, 2012 at 07:15 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
...the last 150 posts
...the last 10 comments