Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Java 13+ #12

Open
kicasta opened this issue Jan 21, 2019 · 2 comments
Open

Support Java 13+ #12

kicasta opened this issue Jan 21, 2019 · 2 comments

Comments

@kicasta
Copy link

kicasta commented Jan 21, 2019

Hi,
calling "site" with Java 13+ fails with the attached exception, with java 8 however works fine. Is there a workaround?

Thanks in advance

Attachment

Stacktrace.txt

@manoelcampos
Copy link
Owner

manoelcampos commented Jan 26, 2019

Hello @kicasta, thanks for reporting the issue.
I've been checking how to fix that but it's a very complicated one since the tools.jar that provides the Doclet API (package com.sun.javadoc) was removed in Java 9 (jigsaw).

A completely new API that doesn't rely on this tools.jar was introduced.
The Doclet API was moved from package com.sun.javadoc to jdk.javadoc.doclet in Java 9+, and changed again in JDK 13.
Furthermore, now we have different classes and interfaces, making this new Doclet API completely incompatible with the Java 8 one.

So, to support Java 9+ it would be required to branch the source tree in two different projects that are difficult and time-consuming to maintain. Another approach is to change the sources to create a single project compatible with Java 8 and Java 9+, using the multi-release jar feature [1] [2]. However, this would require a complete redesign of the project.

In this particular case, it's not just a matter of configuration (as pointed here), because the public interface of the Doclet API was completely redesigned.

The pre-Java 9 Doclet API was a complete mess and needed to be redesigned.
But unfortunately, I won't be able to perform such changes in the short term.
Anyway, even if you have a Java 9+ project, you should be able to run the Coverage Doclet using JDK 8. The best way to switch the JDK version is using sdkman, so that you can use a specific JDK at the command line to build the project. This is useful when you want to achieve a defined goal such as computing the JavaDoc coverage.

@manoelcampos manoelcampos changed the title Build with java 11 Support Java9+ Jan 26, 2019
@manoelcampos manoelcampos changed the title Support Java9+ Support Java 9+ Jan 26, 2019
@kicasta
Copy link
Author

kicasta commented Jan 29, 2019

Hi @manoelcampos ,

thanks for the repply and meaningful explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants