Getting "An illegal reflective access operation has occurred" with AdoptOpenJDK 12

0 votes
asked Apr 3 in Bug by syrdbaw4 (140 points)
I recently upgraded from OpenJDK 11 ( to AdoptOpenJDK 12 (OpenJDK12U-jdk_x64_windows_hotspot_12_33.msi) in order to attempt to workaround some other runtime glitches.

After doing this, I started getting the following warnings:

Error found in diagram DashStructure
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sourceforge.plantuml.svg.SvgGraphics (file:/C:/Users/saares/Google%20Drive/Tools/plantuml.jar) to constructor
WARNING: Please consider reporting this to the maintainers of net.sourceforge.plantuml.svg.SvgGraphics
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

I am unable to reproduce this from the command line at the moment - this is from the Visual Studio Code plugin - but I thought I would post this anyway in case this is some known issue or something new that deserves attention.

2 Answers

0 votes
answered May 17 by Stephan
I also get this messsage when using the command line to ouput plantUML to SVG.
I.e. java -jar plantuml.jar -tsvg sequenceDiagram.txt
I'm using Oracles Java 12.0.1 on a Mac.
commented Jul 16 by nemonik
Me too when using brew installed adoptopenjdk12.
0 votes
answered 6 days ago by Chad

The message is a part of a warnings for future java module improvements. I was able to disable them on OpenJDK 13 on MacOS using PlantUML jar file "plantuml.1.2019.11.jar"

I added the following command line option to java. 

--add-opens java.xml/"