What is an illegal reflective access?

There are a lot of questions about illegal reflective access in Java 9. I have found plenty of discussion about working around the error messages, but I would love to know what an illegal reflective access actually is. So my question is: What defines an illegal reflective access and what circumstances trigger the warning? I … Read more

Replacements for deprecated JPMS modules with Java EE APIs

Java 9 deprecated six modules that contain Java EE APIs and they are going to be removed soon: java.activation with javax.activation package java.corba with javax.activity, javax.rmi, javax.rmi.CORBA, and org.omg.* packages java.transaction with javax.transaction package java.xml.bind with all javax.xml.bind.* packages java.xml.ws with javax.jws, javax.jws.soap, javax.xml.soap, and all javax.xml.ws.* packages java.xml.ws.annotation with javax.annotation package Which maintained third-party … Read more

Failed to install android-sdk: “java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema”

When installing the android sdk tools the following error is emitted: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema Why is this happening and how can it be fixed? Debug output: $ java –version java 9 Java(TM) SE Runtime Environment (build 9+181) Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode) $ brew cask install android-sdk ==> Caveats We will install … Read more

Why does array[idx++]+=”a” increase idx once in Java 8 but twice in Java 9 and 10?

For a challenge, a fellow code golfer wrote the following code: import java.util.*; public class Main { public static void main(String[] args) { int size = 3; String[] array = new String[size]; Arrays.fill(array, “”); for (int i = 0; i <= 100;) { array[i++ % size] += i + ” “; } for (String element: … Read more

What is an illegal reflective access?

Apart from an understanding of the accesses amongst modules and their respective packages. I believe the crux of it lies in the Module System#Relaxed-strong-encapsulation and I would just cherry-pick the relevant parts of it to try and answer the question. What defines an illegal reflective access and what circumstances trigger the warning? To aid in the migration … Read more

JDK9: An illegal reflective access operation has occurred. org.python.core.PySystemState

I’m trying to run DMelt programs (http://jwork.org/dmelt/) program using Java9 (JDK9), and it gives me errors such as: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.python.core.PySystemState (file:/dmelt/jehep/lib/jython/jython.jar) to method java.io.Console.encoding() WARNING: Please consider reporting this to the maintainers of org.python.core.PySystemState WARNING: Use –illegal-access=warn to enable warnings of further illegal … Read more