File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

making source code viewable on my website

 
Jim Rock
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a freeware tool that will take my .java and .jsp files and create .html file showing my source code
 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you need syntax highlighting or anything fancy like that? Most web browsers can display plain text files, like your source code. If you simply upload the files to your website and create links to them, then visitors can view your code just fine. In fact, I use these technique at my C++ website.
 
Jim Rock
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I looked at your website Game of Life example. The C+ code viewed fine. The Java code did not.
I will experiment with your idea and see what I come up with. Thanks.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While researching parsers I found a free tool that converts Java to HTML with color coding. The bad news: I can't find it again!
Another tool I can't find again put links to source code into JavaDoc. I thought that was very nice.
Sorry I don't have links to these things, but hope you find them encouraging in your own search.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
D'oh! Found a couple. These are not the same product, in spite of the interesting similarity of the addresses:
http://www.java2html.de/ - standalone app or applet to format Java to HTML.
http://www.java2html.com/ - Formats Java to HTML and links it into JavaDoc
 
Jim Rock
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stan, I'll take a look at both products
 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java source loads just fine in IE on the computers here at school. It may have to do with file type settings on the viewers platform. I guess I assume that if a user can't view the code directly in the web browser, then they probably know how to save it to a local file and view it in a text editor.
 
Jim Rock
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree Layne it is no hardship to download the source and view in an editor - that worked.
I also loaded some .java .jsp and .xml files into MS Word and saved as an HTML file and that produces excellent results - viewable in both IE and Netscape directly.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Windows I have associated extension Java with my favorite text editor. Source files on my site are stored with extension Java and normal hyperlinks to them. When I click, the browser downloads a temp file and opens the text editor. The problem with this is that the next guy might have Java associated with nothing, or something odd and might get undesired results. The Java2HTML tools would be more reliable for the general public to look at your code.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic