MarlinGraphics2D error with JDK 16

54 views
Skip to first unread message

Botond Kósa

unread,
Mar 17, 2021, 7:24:44 PM3/17/21
to marlin-renderer
Hi Laurent,

When trying to create a MarlinGraphics2D object with JDK 16 I get the following error:

java.lang.IllegalAccessError: class org.marlin.graphics.MarlinGraphics2D (in unnamed module @0xe213dbc) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0xe213dbc
at org.marlin.graphics.MarlinGraphics2D.getBoolean(MarlinGraphics2D.java:786)
at org.marlin.graphics.MarlinGraphics2D.<clinit>(MarlinGraphics2D.java:80)

It might be the result of JEP 396 that was delivered recently with JDK 16.

The error can be avoided by starting the JVM with --illegal-access=permit, but that option is deprecated and will be removed in a future release.

Botond

Laurent Bourgès

unread,
Mar 18, 2021, 9:56:36 AM3/18/21
to marlin-...@googlegroups.com
Hi,

It was useful in java 8 to bypass the former renderer to explicitely use the marlin renderer...

Since jdk11 I do not see any use case as it already provides Marlin renderer as the default engine.

Sorry, but you should give up for java 16+ and use graphics2d directly again.

Cheers,
Laurent


--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-render...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/marlin-renderer/2f748404-c899-4348-80f1-2d176aef00d8n%40googlegroups.com.

Botond Kósa

unread,
Mar 18, 2021, 11:28:30 AM3/18/21
to marlin-renderer
I was using Marlin-graphics to be able to use the latest version of Marlin-renderer (0.9.4.3) because the one integrated in JDK is a few versions behind.

Which version of Marlin-renderer does JDK16 contain?

Laurent Bourgès

unread,
Mar 19, 2021, 7:09:19 AM3/19/21
to marlin-...@googlegroups.com


Le jeu. 18 mars 2021 à 16:28, Botond Kósa <boton...@idata.hu> a écrit :
I was using Marlin-graphics to be able to use the latest version of Marlin-renderer (0.9.4.3) because the one integrated in JDK is a few versions behind.

Which version of Marlin-renderer does JDK16 contain?

In term of bug fixes: same.
Jdk 16 is 0.9.1.3.

I agree it is a bit behind, but it is minor: better sort & curve fixes.

If I would have time & motivation, the solution would be to upgrade jdk17's marlin renderer.

PS: I still have more changes in 0.9.5 or 1.0 branches but less time to afford to finish.

Laurent



bourges.laurent a következőt írta (2021. március 18., csütörtök, 14:56:36 UTC+1):
Hi,

It was useful in java 8 to bypass the former renderer to explicitely use the marlin renderer...

Since jdk11 I do not see any use case as it already provides Marlin renderer as the default engine.

Sorry, but you should give up for java 16+ and use graphics2d directly again.

Cheers,
Laurent


Le jeu. 18 mars 2021 à 00:24, Botond Kósa <boton...@idata.hu> a écrit :
Hi Laurent,

When trying to create a MarlinGraphics2D object with JDK 16 I get the following error:

java.lang.IllegalAccessError: class org.marlin.graphics.MarlinGraphics2D (in unnamed module @0xe213dbc) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0xe213dbc
at org.marlin.graphics.MarlinGraphics2D.getBoolean(MarlinGraphics2D.java:786)
at org.marlin.graphics.MarlinGraphics2D.<clinit>(MarlinGraphics2D.java:80)

It might be the result of JEP 396 that was delivered recently with JDK 16.

The error can be avoided by starting the JVM with --illegal-access=permit, but that option is deprecated and will be removed in a future release.

Botond

--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-render...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/marlin-renderer/2f748404-c899-4348-80f1-2d176aef00d8n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "marlin-renderer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to marlin-render...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages