trouble with java -Xpatch

Alan Bateman Alan.Bateman at oracle.com
Mon Mar 28 17:30:25 UTC 2016


Sorry, it is a bit confusing as we aren't quite done with the transition 
from an older form of a -Xpatch to the new form.

The syntax you see in JEP 261 and in the java -X usage output is the new 
form. That works for modules defined to the platform or application 
class loaders but doesn't work for modules (like java.base) that are 
defined to the boot loader. Lois is working on the missing piece in 
hotspot, it is tracked by JDK-8146448. All the other pieces (in javac 
and the runtime) are in place.

In the mean-time, the old form still works. The old syntax is 
-Xpatch:<dir>(:<dir>*) where <dir> is a directory of exploded patches. 
If you want to override CHM then you would run with -Xpatch:jsr166 where 
jsr166 contains:

   java.base/java/util/concurrent/ConcurrentHashMap.class

You can use the old syntax with the first usage of -Xpatch, not second 
or subsequent usages. That is why you see a difference in the 
-Xpatch:junk behavior when you specify it more than once.

-Alan.


More information about the jigsaw-dev mailing list