 |
Building javadoc from J2SDK source code
Posted by mister__m on December 25, 2003 at 07:04 AM | Comments (8)
If you read my last blog entry about J2SDK 1.5 alpha availability, you know you cannot make public comments about. So, with that information in mind, let's move on :-D
Suppose you download a J2SDK version from Sun that comes with no documentation at all. Well, all of them come without it, but for most you can get the docs as a separate bundle and install them. Very recently, I downloaded a J2SDK version for which there is no documentation at all. And no, you cannot download it from Sun's site; it is not there. How am I supposed to work with a JDK that has no documentation? At least, I can build javadoc from its source code and it becomes more usable - though not completely, as the new features summary and those sections where concepts are explained and detailed are necessary for a full experience :-D.
In case you happen to face the same problem - if you read my blog frequently, there is a chance you are :-D -, here is a sample Ant build script - not the best possible, it's not the point - you may use to build javadoc from source code:
That is it, folks! Remember to edit the script so JDK_HOME becomes your real JDK installation home (ex: C:\j2sdk1.4.2_02), JDK_MAJOR_VERSION becomes the major version of the JDK you are using (ex: 1.4, 1.5 ...) and PLATFORM_EXTENSION becomes the extension used by executables in your platform (ex: for Windows, it's exe). And yeah, it consumes a lot of memory. You can change the value -J-Xmx512m as you want, but it didn't work for me with 128mb, for example. It took around 8 minutes to run it in a P4 2.4GHz with 1GB - hey, but I was making normal use of it (4 IM softwares, email client, etc.)
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
Thanx
Sharing is cool :)
Posted by: zander on December 26, 2003 at 01:18 PM
-
Code browsing
Eclipse and jEdit are both really good for browsing source, despite that not being their primary purpose. They both have search features that can be used across an entire directory, if you are looking for a string link "@since version".
http://eclipse.org/
http://jedit.org/
Of course Juliet is a perfect aid for those seeking to understand a large code base.
http://infotectonica.com/juliet/
There are also source cross-reference tools, but I'm not sure that any support both large code bases and the complete set of Java language constructs.
Javasrc
http://javasrc.sourceforge.net/
Jxref
http://www.squarebox.co.uk/download/jxref.html
I'm pretty sure that I'm leaving out one of the major Java cross-reference tools, but I can't find a reference to it. Would anyone like to supply it, and/or references to other tools that should be included?
There are also specialized tools to enhance the usefulness of Javadoc like:
Documentation Enhancer for Java
http://www.haifa.il.ibm.com/projects/systems/ple/DEJava/
dbdoc
http://sourceforge.net/projects/ashkelon/
Bruiser - The Javadoc Browser
http://bruiser.sourceforge.net/
and of course:
JDiff - An HTML Report of API Differences
http://javadiff.sourceforge.net/
I'm sure additonal scripts for running these tools with various J2SDK versions would be welcomed to these pages.
- Curt
Posted by: coxcu on December 27, 2003 at 08:05 AM
-
Code browsing: BeanShell
I forgot BeanShell, which not only includes a handy class browser, but is the perfect tool for toying with new APIs.
http://beanshell.org/
- Curt
Posted by: coxcu on December 27, 2003 at 11:06 AM
-
Why not use ant task ?
Why are you not using the Ant task javadoc ?
It seems to work pretty well also.
Just be sure that Ant is running with JDK 1.5.
I can't understand the reason why you use the execute.
Any reason why ?
Posted by: vbrabant on January 03, 2004 at 07:32 AM
-
Why not use ant task ?
I can't assure you, but it seems the javadoc task does not use the JDK javadoc, what makes it not be able to support features you may find in a new JDK version.
So, the problem is with Ant javadoc task and not with the JDK itself . javadoc just works well with JDK versions it has been written to work with :-D (as I think it is risky to give a direct answer to your question). I tried the easier way first to see if it worked in my particular case and it didn't.
Posted by: mister__m on January 03, 2004 at 12:41 PM
-
Why not use ant task ?
It seems to work on my pc with Ant 1.6 and JDK1.5.
Just be sure that Ant is well unning under the JDK1.5, and say that source is well 1.5.
would work.
The only problem I had was concerning the memory consumption. But I had the same problem with your solution (I have *only* 384Mo)
Posted by: vbrabant on January 05, 2004 at 05:47 AM
-
Re: Why not use ant task ?
I haven't tested it with Ant 1.6. If that is the problem - a new version of Ant supports JDK versions other did not -, the script is then very useful whenever a new JDK version comes out. Memory _is_ indeed a problem, as I told you :-D
Posted by: mister__m on January 05, 2004 at 05:59 AM
-
take a look at http://www.java2s.com/Open-Source/Java-Document/CatalogJava-Document.htm
Posted by: asdf263 on October 04, 2007 at 09:44 PM
|