Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javadoc 1.7 treats class files as sources

907581Dec 27 2011 — edited Dec 27 2011
Hi,

I'd like to figure out what has changed since java 1.7 regarding javadoc tool. When I try to generate info I get multiple errors complaining that .class file has "illegal character", "unmappable character for encoding". Looks like javadoc tries to read .class file as .java.

Although, identically the same command works fine in java 1.6

Assume we have package "foobar".

Compiling:

javac -d foobar-classes foobar/*.java

Running javadoc. Seeing lots of error messages.

/opt/java7/bin/javadoc -sourcepath . -classpath foobar-classes -output /var/tmp -subpackages foobar

Running 1.6 javadoc. All is ok.

/opt/java6/bin/javadoc -sourcepath . -classpath foobar-classes -output /var/tmp -subpackages foobar

I know, I could omit '-classpath' option here, but what if my sources depend on foreign binary stuff? Then I see javadoc messages about 'Symbol not found'. Anyway, java6 just works fine and java7 doesn't.

I use:
Ubuntu 10.04.3, x64 and
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

PS: Initially, I faced with that problem dealing with Jersey/WADL stuff, but then limit this problem to this simple case which I described above.

Edited by: user4361376 on Dec 27, 2011 3:54 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 24 2012
Added on Dec 27 2011
0 comments
890 views