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

Compiling with JDK11 #21

Closed
qwert2003 opened this issue Mar 5, 2019 · 3 comments
Closed

Compiling with JDK11 #21

qwert2003 opened this issue Mar 5, 2019 · 3 comments

Comments

@qwert2003
Copy link

When compiling the library jfreesvg with JDK11 I get the following error:

/[....]/org/jfree/graphics2d/svg/SVGGraphics2D.java:90: error: package javax.xml.bind is not visible
import javax.xml.bind.DatatypeConverter;
  (package javax.xml.bind is declared in module java.xml.bind, which is not in the module graph)

Others seem to have similar issues, e.g. tomdesair/tus-java-server#14 (just found by searching). They say:

In JDK11 the javax.xml.bind package was removed. You use the javax.xml.bind.DatatypeConverter for Base64 encoding. Maybe you can replace this with java.util.Base64 from Java 8 or other implementation?

Not sure it is the same issue though. Any ideas?

@jfree
Copy link
Owner

jfree commented Dec 30, 2019

Not sure why I never replied, but your suggestion was applied:

2e6cd5f

Will be included in the next release.

@jfree jfree closed this as completed Dec 30, 2019
@petebankhead
Copy link

Hi,
This is a great library, and great to see the update for JDK 11. For this commit, it looks to me that

this.sb.append(Base64.getEncoder().encode(getPNGBytes(img)));

should rather be

this.sb.append(Base64.getEncoder().encodeToString(getPNGBytes(img)));

Otherwise, I find the default String representation of the byte array is written within the image, i.e. something like [B@210dfa10 rather than the actual String.

@jfree jfree reopened this Mar 25, 2020
@jfree
Copy link
Owner

jfree commented Mar 26, 2020

You are correct. Fixing this now.

@jfree jfree closed this as completed Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants