Menu

-jd web_reference http://...

2008-06-02
2013-04-11
  • Ethan Bolker

    Ethan Bolker - 2008-06-02

    I can't seem to get the -jd flag to work to create a web reference. I've tried many variants on

    java -jar "C:\Program Files\j2h\j2h.jar" -js project -d 2h -jd web_reference http://java.sun.com/j2se/1.4.2/docs/api/ 

    and get no links for Java classes. I can link to a local copy of the api, as file://, but then my browser fails when I put the code up on my web page.

    I may have a workaround but I'd like to do it right ...

     
    • Jason S

      Jason S - 2008-06-02

      yes, it's a bit weak this feature, it needs a local copy of the the JavaDoc to scan as well as the http reference.

      Feel free to fix it.

      Jason

       
    • Leon Poyyayil

      Leon Poyyayil - 2008-06-02

      hi,

      as i understood the feature (and how i can successfully use it) is as follows:

      - you first specify the local copy of the api you want to link to
      - and optionally specify the corresponding location of the web resources for these

      e.g. in your example this would result to something like the following command line:

      java -jar c:\programs\j2h\j2h.jar -js project -d 2h -jd c:\jdk\1.4.2\docs\api http://java.sun.com/j2se/1.4.2/docs/api

      this would work as follows:
      for every class that is not part of the sources in 'project' it will look for a matching javadoc file in 'c:\jdk\1.4.2\docs\api'. if it finds a matching file it would insert a link to the corresponding file under the 'http://java.sun.com/j2se/1.4.2/docs/api' url.

      this works in my environment, hope it helps in yours.

      cheers
      leon

       
    • Ethan Bolker

      Ethan Bolker - 2008-06-03

      Yes, you've (both) solved my problem.

      Thanks.

      Jason: No, I don't think I'll fix it. But there's a quick good enough fix that requires no coding - just explain on the java2html web page what needs to be done.

      Ethan

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.