• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should I link the standard java API in my javadoc?

 
Davidd Smith
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all,
Should I link the standard java API in my javadoc?
Regards
Davidd
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Davidd,
I think it makes your application just a little bit more professional if you do. And it is a very easy thing to do, so why not?
Regards, Andrew
 
Davidd Smith
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Andrew,
If I link the standard API, should I submit it? But the instructions said: "you must not submit any code that is not your own work."
Regards
Davidd
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That refers to code, meaning .java files. Here we're talking about the javadoc API, which is supposed to be auto-generated after all. I mean, sure, it incorporates javadoc comments which come from the code and were composed by you - but it it also writes a lot of stuff for you. That's the way it's supposed to work.
Note that I don't think your API should include a local copy of Sun's APIs. It should just have links to the Sun APIs, so that (for example) when I look at the Data API and it shows that it extends java.lang.Object, I can click on Object and get a link to http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html . (Or whatever version number is appropriate for you.)
 
Davidd Smith
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Andrew and Jim
Thank you.
Regards
Davidd
 
G.T. Reddy
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew,
When I try to link JAVA API in my javadoc using -link option I am getting an error as shown below.
Error fetching URL: http://java.sun.com/j2se/1.3/docs/api/package-list"
The actual problem is my machine is running behind a proxy.that's why I could not generate it.
Iy you have any idea please share it.
Thanks,
Reddy.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Reddy,
Download the package list and store it locally. Then use the -linkoffline option to refer to the locally stored list.
Regards, Andrew
 
G.T. Reddy
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew,
Still I am getting error. I downloaded the list(package-list) and referred it in the command as follows:
D:\JCD\gtr\assignment\SRC>javadoc -windowtitle "Fly By Night Services � Database Client/Server API Specification" -doctitle "Fly By Night Services<sup><font size="-2">TM</font></sup> Database Client/Server API Specification" -header "<b>Fly By Night Services API</b>" -version -author -d . -sourcepath . -linkoffline @mypackage.txt @package-list
<b>Error:</b>
<b>javadoc: Error reading file: java.awt\package-list </B>.
here mypackage.txt and package-list are in the same directory.
If I donot this link or linkoffline option then it will work fine.
Thanks,
Reddy.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Reddy,
Without seeing the contents of your @files it is difficult to guess what the problem is.
Here's my command line, perhaps you can see a difference between what I am doing and what you are doing:

As you can see, the first parameter to the "-linkoffline" option is the base URL to the online documentation. The second parameter is the directory name containing the "package-list" file.
Regards, Andrew
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those great big ugly commands prompt me to you point to http://ant.apache.org
I type "ant javadoc" - creates the javadoc.
"ant release" creates my submission file, along with build number (in documentation, javadoc, etc.) and the appropriate directory structure of the jar (write the build file once, verify the build and you can be 99.9% sure that your submission file is of the correct structure).
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tony,
Ant is very nice, and makes repetitive commands easy. Especially with something like generating the API documentation - the configuration is almost identical in every project.
But for the convenience of those who do not use ant, when I post a response to someone who has not specifically mentioned ant, I use the full command line (extracted by running 'ant -verbose <cmd>').
Posting the ant configuration for the above could be cryptic to someone not using ant:

Someone could almost certainly work out what each of those options map to on the command line, but why go to all that trouble when it is simple for me to get the command line that ant generates and post that?
Regards, Andrew
 
G.T. Reddy
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Andrew. It's working fine.The problem here is I used wrong parameters for the -link option.Actually it requires JAVA API patameter parameter and directory path the list file(not file name).
Thanks once again.
rgds,
Reddy.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic