0 Replies Latest reply on Dec 27, 2011 11:54 AM by 907581

    javadoc 1.7 treats class files as sources


      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".


      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