pathikrit
pathikrit

Reputation: 33489

Java source code display in a browser?

I have my Java source code in the standard src/ lib/ test/ directory structure for my project. I want to generate a web view of my source code where I can fire up a browser and see syntax-highlighted, line numbered code. I not only want this but I also want the files to be correctly linked (e.g. clicking on a method/class/interface etc name on the webpage view of the code, it would take me "Eclipse-style" to the relevant page). Is there any piece of software that already does this? I know there is tons of syntax highlight js and css out there so that part is easy and thus I am more interested in the linking part.

Upvotes: 7

Views: 3677

Answers (3)

joeslice
joeslice

Reputation: 3464

OpenGrok does much of what you are asking for, also allowing for interesting searches.

Upvotes: 0

Ira Baxter
Ira Baxter

Reputation: 95420

See our Java Source Code Browser. Combines Java source code browsing with JavaDoc style cross references. Hyperlinks on identifiers follow Java's scoping rules fully.

Presently operates with Java 1.4, now completing versions for Java 1.5 and up.

EDIT May 2012: Handles Java 1.6 and Java 7

Upvotes: 1

Will Iverson
Will Iverson

Reputation: 2079

I think your best bet would be Cobertura. Out-of-the-box it will generate nice HTML versions of your source. As a side benefit, it will also generate your code coverage report as well. ;)

Maven JXR is another option as well (if you are using Maven).

Upvotes: 1

Related Questions