如何解决jdk9的模块化问题
我想使用JDK9:jrt-fs.jar下的java.desktop模块下的com.sun.java.swing.plaf.windows.*包中的类,但是因为被jdk9封装了,无法访问。我该怎么解决呢?
在网上搜到的解决方法如下:
========================================================================================
You can pass VM flags through jmod using a -J prefix, so -J-XaddExports:... (this goes for a few of the different JDK tools).
Also note that the format for addExports recently changed so that it takes a module/package=comma-separated list of modules, so -XaddExports:java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED,java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED will have to be written using two exports: -XaddExports:java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED -XaddExports:java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED
========================================================================================
但是不会使用-XaddExports。请问怎么执行呢?