• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

making source code viewable on my website

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Stan, I'll take a look at both products
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic