| Author |
NX: javadoc problem with assert keyword
|
Jacques Bosch
Ranch Hand
Joined: Dec 18, 2003
Posts: 319
|
|
I get the message below when trying to generate my javadoc. But I'm using assert correctly as a keyword and not as an identifier.
code/suncertify/StartupGUI.java:320: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier assert false : "Invalid mode: " + mode;
Do I have to use some kind of parameter when generating javadocs with asserts in the code? Also, how can I generate javadocs for suncertify package and also all sub packages? Currently I do something like %JAVA_HOME%\bin\javadoc -d "JavaDocOutputDir" code/suncertify/db/*.java But then that's only for the db package. [ January 19, 2004: Message edited by: Jacques Bosch ]
|
Jacques<br />*******<br />MCP, SCJP, SCJD, SCWCD
|
 |
Javini Javono
Ranch Hand
Joined: Dec 03, 2003
Posts: 286
|
|
Hi, Here, perhaps, is one answer to one of your questions (also see Sun's site, it has extensive documentation on JavaDoc): This is all one command line: javadoc -d ../docs/javadoc -private -author -overview suncertify/overview.html -subpackages suncertify Obviously, your exact command will be different, since my command is issued from a command file on unix (also have a version for windoz). And, you'll probably want to read the documentation and play around with the above until it does what you want. The "-subpackages" command is how it goes into nested folders. And, you may not want the same modifiers; that is, the above is being used during development, and I may change it later for the final submittal, or I may not. Thanks, Javini Javono
|
 |
Jacques Bosch
Ranch Hand
Joined: Dec 18, 2003
Posts: 319
|
|
Thanx Javini. That helps. Still trying to solve the assert issue. Browsing javadoc homepage now.
|
 |
Jacques Bosch
Ranch Hand
Joined: Dec 18, 2003
Posts: 319
|
|
OK. I have solved the assert problem with the "-source 1.4" flag. Just like with the compiler. According to what I could figure out, It has to be run like this: javadoc -source 1.4 -d "output/javadoc" -sourcepath code/suncertify -subpackages suncertify But then all I get is: "No public or protected classes found to document." If I run: javadoc -source 1.4 -d "output/javadoc" -sourcepath code/suncertify -subpackages code/suncertify/db/*.java Then it works on the db package. The documentation says:
Wildcards are not allowed; use -subpackages for recursion. The Javadoc tool uses -sourcepath to look for these package names.
But I can only get it to work with wildcards, and that only on 1 package at a time.... [ January 20, 2004: Message edited by: Jacques Bosch ]
|
 |
Jacques Bosch
Ranch Hand
Joined: Dec 18, 2003
Posts: 319
|
|
Is there anybody that can help me with my above javadoc problem?
|
 |
George Marinkovich
Ranch Hand
Joined: Apr 15, 2003
Posts: 619
|
|
Hi Jacques, I did something like this: createDoc.bat file: -------------------------------------------------------------- javadoc @options @packages options file: -------------------------------------------------------------- -classpath \xxxxxx\xxxXxxxxxx\classes -d \xxxxxx\xxxXxxxxxx\docs -nosince -overview \xxxxxx\xxxXxxxxxx\code\suncertify\overview.html -source 1.4 -sourcepath \xxxxxx\xxxXxxxxxx\code -use packages file: -------------------------------------------------------------- suncertify.db suncertify.remote suncertify.gui You might want to try something similar. Hope this helps, George
|
Regards, George
SCJP, SCJD, SCWCD, SCBCD
|
 |
Jacques Bosch
Ranch Hand
Joined: Dec 18, 2003
Posts: 319
|
|
Hey George. Looks usefull. I'll give it a shot! Thanx so much.
|
 |
Jacques Bosch
Ranch Hand
Joined: Dec 18, 2003
Posts: 319
|
|
Hey George. I must thank you for this one! It worked beautifully. Sorted out all my javadoc problems. THANX MUCH!
|
 |
 |
|
|
subject: NX: javadoc problem with assert keyword
|
|
|