I may be missing something, but javap's --system flag doesn't seem to work.
I expected it to override the lookup of classes in the system image, e.g. using --system should control which definition of java.util.List is printed.
The following example shows that running javap from JDK 18 and JDK 19 respectively shows a difference, but when using the JDK 19 javap and configuring --system to point to different JDKs it always prints the same definition of java.util.List.
```
# define JAVA18_HOME and JAVA19_HOME to refer to paths for the corresponding JDKS
# verify the versions
$ $JAVA18_HOME/bin/java -fullversion
openjdk full version "18.0.1.1+2-6"
$ $JAVA19_HOME/bin/java -fullversion
openjdk full version "19.0.2+7-44"
# using different javap implementations shows different definitions of java.util.List
$ diff <($JAVA18_HOME/bin/javap -v java.util.List) <($JAVA19_HOME/bin/javap -v java.util.List)
...
< major version: 62
---
> major version: 63
# using the same javap implementation but configuring --system always shows the same definition of java.util.List
$ diff <($JAVA19_HOME/bin/javap -v --system $JAVA18_HOME java.util.List) <($JAVA19_HOME/bin/javap -v --system $JAVA19_HOME java.util.List)
...
no change
```
I expected it to override the lookup of classes in the system image, e.g. using --system should control which definition of java.util.List is printed.
The following example shows that running javap from JDK 18 and JDK 19 respectively shows a difference, but when using the JDK 19 javap and configuring --system to point to different JDKs it always prints the same definition of java.util.List.
```
# define JAVA18_HOME and JAVA19_HOME to refer to paths for the corresponding JDKS
# verify the versions
$ $JAVA18_HOME/bin/java -fullversion
openjdk full version "18.0.1.1+2-6"
$ $JAVA19_HOME/bin/java -fullversion
openjdk full version "19.0.2+7-44"
# using different javap implementations shows different definitions of java.util.List
$ diff <($JAVA18_HOME/bin/javap -v java.util.List) <($JAVA19_HOME/bin/javap -v java.util.List)
...
< major version: 62
---
> major version: 63
# using the same javap implementation but configuring --system always shows the same definition of java.util.List
$ diff <($JAVA19_HOME/bin/javap -v --system $JAVA18_HOME java.util.List) <($JAVA19_HOME/bin/javap -v --system $JAVA19_HOME java.util.List)
...
no change
```
- relates to
-
JDK-8333308 javap --system handling doesn't work on internal class names
-
- Resolved
-