Solved

How to make javadoc aware of external .jar

Posted on 2006-11-24
23
969 Views
Last Modified: 2013-11-23
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
Comment
Question by:sciuriware
  • 12
  • 5
  • 5
  • +1
23 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 18006471
Can we see some of the error messages?
0
 
LVL 24

Author Comment

by:sciuriware
ID: 18006790
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
 
LVL 10

Expert Comment

by:mbvvsatish
ID: 18006800
0
 
LVL 35

Expert Comment

by:girionis
ID: 18006825
Can you post the command line you use?
0
 
LVL 24

Author Comment

by:sciuriware
ID: 18006841
javadoc.exe -public -d javadocPath *.java

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

;JOOP!
0
 
LVL 35

Expert Comment

by:girionis
ID: 18006863
What happens if you do this

javadoc.exe -public -d javadocPath jcalendar.jar *.java
0
 
LVL 24

Author Comment

by:sciuriware
ID: 18006924
javadoc: error - Illegal package name: jcalendar.jar

;JOOP!
0
 
LVL 35

Expert Comment

by:girionis
ID: 18006935
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
 
LVL 24

Author Comment

by:sciuriware
ID: 18007054
I guess that then I will create a compound javadoc of my stuff and that made by Toedter.

;JOOP!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 18007088
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
 
LVL 24

Author Comment

by:sciuriware
ID: 18007098
re-jarring the downloaded library?
What's that good for?

;JOOP!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 86

Expert Comment

by:CEHJ
ID: 18007106
I thought the thing might be corrupt
0
 
LVL 24

Author Comment

by:sciuriware
ID: 18007114
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
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 145 total points
ID: 18007124
Well i got exactly the same error message anyway. Is it *in* the classpath btw?
0
 
LVL 24

Author Comment

by:sciuriware
ID: 18007185
Yes, i.e. the .jar is in a 'lib' directory that is in the directory mentioned in CLASSPATH.

;JOOP!
0
 
LVL 35

Accepted Solution

by:
girionis earned 355 total points
ID: 18007275
You should put the jar itself in the classpath, export CLASSPATH=$CLASSPATH:/home/user/lib/jcalendar.jar
0
 
LVL 24

Author Comment

by:sciuriware
ID: 18007314
I already did that.

;JOOP!
0
 
LVL 24

Author Comment

by:sciuriware
ID: 18007919
I found it:

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

Funny because now it should not recognise the standard libraries.

;JOOP!
0
 
LVL 24

Author Comment

by:sciuriware
ID: 18007929
Sorry folks, no CLASSPATH, no corruption, no weird doclet ....

;JOOP!
0
 
LVL 24

Author Comment

by:sciuriware
ID: 18007932
I'm going to spread some points, because this item must be available to others.

;
J
O
O
P
!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 18010776
:-)
0
 
LVL 35

Expert Comment

by:girionis
ID: 18017670
:)
0
 
LVL 24

Author Comment

by:sciuriware
ID: 18017733
(:-)}={

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 71
unix in java example 9 53
rhino JavaScript import, load 25 67
Configure a Bean in an XML file 4 6
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
The viewer will learn how to implement Singleton Design Pattern in Java.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now