• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 984
  • Last Modified:

How to make javadoc aware of external .jar

Hi,
I practise javadoc on my sources from the commandline (i.c. spawned from an application)
Since some time I started to make use of downloaded .jar's
Compilation works as a charm.
Now javadoc is complaining that some imports from and references to external .jar's can't be checked.
The javadoc output is correct, but I would like to suppress (that is solve) the error messages.
I tried the -classpath option but that is probably not the right way.

;JOOP!
0
sciuriware
Asked:
sciuriware
  • 12
  • 5
  • 5
  • +1
2 Solutions
 
CEHJCommented:
Can we see some of the error messages?
0
 
sciuriwareAuthor Commented:
Working on a wrapper around the Toedter JDateChooser:

Test.java:25: package com.toedter.calendar does not exist
import com.toedter.calendar.JDateChooser;
                            ^
Test.java:61: cannot find symbol
symbol  : class JDateChooser


;JOOP!
0
 
mbvvsatishCommented:
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
girionisCommented:
Can you post the command line you use?
0
 
sciuriwareAuthor Commented:
javadoc.exe -public -d javadocPath *.java

This worked perfectly for years until I started to use jcalendar.jar

;JOOP!
0
 
girionisCommented:
What happens if you do this

javadoc.exe -public -d javadocPath jcalendar.jar *.java
0
 
sciuriwareAuthor Commented:
javadoc: error - Illegal package name: jcalendar.jar

;JOOP!
0
 
girionisCommented:
Not sure whatelse to try. As a last resort, what happens if you extract the files from jcalendar.jar and use the -classpath option?
0
 
sciuriwareAuthor Commented:
I guess that then I will create a compound javadoc of my stuff and that made by Toedter.

;JOOP!
0
 
CEHJCommented:
Try extracting the classes and re-jarring them. I had exactly the same problem when i tried it, although i didn't then take the course of action i just mentioned
0
 
sciuriwareAuthor Commented:
re-jarring the downloaded library?
What's that good for?

;JOOP!
0
 
CEHJCommented:
I thought the thing might be corrupt
0
 
sciuriwareAuthor Commented:
Checked: it is fine (and my programs run with it).

No the problem is with javadoc, somehow it 'knows' of standard libraries and
besides, I wonder why it does difficult about references that are not used
to produce the javadoc output.
;JOOP!
0
 
CEHJCommented:
Well i got exactly the same error message anyway. Is it *in* the classpath btw?
0
 
sciuriwareAuthor Commented:
Yes, i.e. the .jar is in a 'lib' directory that is in the directory mentioned in CLASSPATH.

;JOOP!
0
 
girionisCommented:
You should put the jar itself in the classpath, export CLASSPATH=$CLASSPATH:/home/user/lib/jcalendar.jar
0
 
sciuriwareAuthor Commented:
I already did that.

;JOOP!
0
 
sciuriwareAuthor Commented:
I found it:

             javadoc.exe -public -d javadocPath -extdirs lib *.java
                                                               ^^^^^^^

Funny because now it should not recognise the standard libraries.

;JOOP!
0
 
sciuriwareAuthor Commented:
Sorry folks, no CLASSPATH, no corruption, no weird doclet ....

;JOOP!
0
 
sciuriwareAuthor Commented:
I'm going to spread some points, because this item must be available to others.

;
J
O
O
P
!
0
 
CEHJCommented:
:-)
0
 
girionisCommented:
:)
0
 
sciuriwareAuthor Commented:
(:-)}={

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 12
  • 5
  • 5
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now