<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I am able to test with jdk10 by commenting the requirement part in test/jdk/TEST.ROOT<div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">#requires.extraPropDefns = ../../../open/test/jtreg-ext/requires/VMProps.java</span></div><div class=""><br class=""></div><div class="">but when I try to test with jdk9 or jdk8 I am getting this</div><div class=""><br class=""></div><div class=""><div class="">java.lang.UnsupportedClassVersionError: bug5062649 : Unsupported major.minor version 54.0</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at java.lang.ClassLoader.defineClass1(Native Method)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at java.lang.ClassLoader.defineClass(ClassLoader.java:760)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>at java.net.URLClassLoader.defineClass(URLClassLoader.</div><div><br class=""></div><div>Any suggestions?</div><div><br class=""></div><div>Regards</div><div>Prasanta<br class=""><blockquote type="cite" class=""><div class="">On 12-Mar-2020, at 11:36 AM, David Holmes <<a href="mailto:david.holmes@oracle.com" class="">david.holmes@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">On 12/03/2020 3:45 pm, Prasanta Sadhukhan wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">Hi David,<br class="">I tried removing JTwork but still getting issue<br class="">./bin/jtreg -jdk:/Users/PRSADHUK/Downloads/jdk-10.jdk/Contents/Home/ /export/jdk/client/closed/test/jdk/javax/swing/JEditorPane/5062649/bug5062649.java<br class="">Directory "JTwork" not found: creating<br class="">Directory "JTreport" not found: creating<br class="">failed to get value for vm.jvmci<br class="">java.lang.UnsatisfiedLinkError: sun.hotspot.WhiteBox.isGCSelected(I)Z<br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Ah yes. VMProps relies on the WhiteBox API built into the JVM. You cannot run on an earlier JDK in that case. You would have to modify VMProps.java locally to check for the UnsatisfiedLinkErrors and then decide whether to return true or false for the various hasXXX methods based on the JDK you are using to execute the tests.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">David</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">at sun.hotspot.WhiteBox.isGCSelected(Native Method)<br class="">at sun.hotspot.gc.GC.isSelected(GC.java:62)<br class="">at sun.hotspot.gc.GC.selected(GC.java:78)<br class="">at requires.VMProps.vmJvmci(VMProps.java:242)<br class="">at requires.VMProps$SafeMap.put(VMProps.java:69)<br class="">at requires.VMProps.call(VMProps.java:94)<br class="">at requires.VMProps.call(VMProps.java:57)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:80)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)<br class="">failed to get value for vm.hasJFR<br class="">java.lang.UnsatisfiedLinkError: sun.hotspot.WhiteBox.isJFRIncludedInVmBuild()Z<br class="">at sun.hotspot.WhiteBox.isJFRIncludedInVmBuild(Native Method)<br class="">at requires.VMProps.vmHasJFR(VMProps.java:339)<br class="">at requires.VMProps$SafeMap.put(VMProps.java:69)<br class="">at requires.VMProps.call(VMProps.java:104)<br class="">at requires.VMProps.call(VMProps.java:57)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:80)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)<br class="">failed to get value for vm.aot<br class="">java.lang.UnsatisfiedLinkError: sun.hotspot.WhiteBox.isGCSelected(I)Z<br class="">at sun.hotspot.WhiteBox.isGCSelected(Native Method)<br class="">at sun.hotspot.gc.GC.isSelected(GC.java:62)<br class="">at sun.hotspot.gc.GC.selected(GC.java:78)<br class="">at requires.VMProps.vmAOT(VMProps.java:381)<br class="">at requires.VMProps$SafeMap.put(VMProps.java:69)<br class="">at requires.VMProps.call(VMProps.java:108)<br class="">at requires.VMProps.call(VMProps.java:57)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:80)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)<br class="">failed to get value for vm.aot.enabled<br class="">java.lang.UnsatisfiedLinkError: sun.hotspot.WhiteBox.aotLibrariesCount()I<br class="">at sun.hotspot.WhiteBox.aotLibrariesCount(Native Method)<br class="">at requires.VMProps.vmAotEnabled(VMProps.java:399)<br class="">at requires.VMProps$SafeMap.put(VMProps.java:69)<br class="">at requires.VMProps.call(VMProps.java:109)<br class="">at requires.VMProps.call(VMProps.java:57)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:80)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)<br class="">failed to get value for vm.cds.archived.java.heap<br class="">java.lang.UnsatisfiedLinkError: sun.hotspot.WhiteBox.isJavaHeapArchiveSupported()Z<br class="">at sun.hotspot.WhiteBox.isJavaHeapArchiveSupported(Native Method)<br class="">at requires.VMProps.vmCDSForArchivedJavaHeap(VMProps.java:426)<br class="">at requires.VMProps$SafeMap.put(VMProps.java:69)<br class="">at requires.VMProps.call(VMProps.java:113)<br class="">at requires.VMProps.call(VMProps.java:57)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:80)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)<br class="">failed to get value for vm.gc.Serial<br class="">java.lang.UnsatisfiedLinkError: sun.hotspot.WhiteBox.isGCSupported(I)Z<br class="">at sun.hotspot.WhiteBox.isGCSupported(Native Method)<br class="">at sun.hotspot.gc.GC.isSupported(GC.java:55)<br class="">at requires.VMProps.lambda$vmGC$0(VMProps.java:285)<br class="">at requires.VMProps$SafeMap.put(VMProps.java:69)<br class="">at requires.VMProps.vmGC(VMProps.java:284)<br class="">at requires.VMProps.call(VMProps.java:121)<br class="">at requires.VMProps.call(VMProps.java:57)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.run(GetJDKProperties.java:80)<br class="">at com.sun.javatest.regtest.agent.GetJDKProperties.main(GetJDKProperties.java:54)<br class="">failed to get value for vm.gc.Parallel<br class="">java.lang.UnsatisfiedLinkError: sun.hotspot.WhiteBox.isGCSupported(I)Z<br class="">at sun.hotspot.WhiteBox.isGCSupported(Native Method)<br class="">……<br class="">Regards<br class="">Prasanta<br class=""><blockquote type="cite" class="">On 12-Mar-2020, at 5:06 AM, David Holmes <<a href="mailto:david.holmes@oracle.com" class="">david.holmes@oracle.com</a><span class="Apple-converted-space"> </span><<a href="mailto:david.holmes@oracle.com" class="">mailto:david.holmes@oracle.com</a>>> wrote:<br class=""><br class="">Hi Prasanta,<br class=""><br class="">On 11/03/2020 6:22 pm, Prasanta Sadhukhan wrote:<br class=""><blockquote type="cite" class="">Hi,<br class="">I intend to test a jtreg test with jdk10 and below with jtreg5.0. This are the steps I did<br class="">./bin/jtreg -version<br class="">jtreg, version 5.0 dev 762<br class="">export JT_JAVA=/Users/PRSADHUK/Downloads/jdk-15.jdk/Contents/Home/<br class="">PRSADHUK-Mac:jtreg PRSADHUK$ ./bin/jtreg -jdk:/Users/PRSADHUK/Downloads/jdk-10.jdk/Contents/Home/ /export/jdk/client/closed/test/jdk/javax/swing/JEditorPane/5062649/bug5062649.java<br class="">Exception while calling user-specified class: requires.VMProps<br class="">java.lang.UnsupportedClassVersionError: requires/VMProps has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 54.0<br class="">at java.base/java.lang.ClassLoader.defineClass1(Native Method)<br class="">I am sure this is very known issue. Can someone guide me as to what needs to be done to test with older jdk?<br class="">BTW, the repo is latest<span class="Apple-converted-space"> </span><a href="http://hg.openjdk.java.net/jdk/client" class="">hg.openjdk.java.net/jdk/client</a><span class="Apple-converted-space"> </span><<a href="http://hg.openjdk.java.net/jdk/client" class="">http://hg.openjdk.java.net/jdk/client</a>> <<a href="http://hg.openjdk.java.net/jdk/client" class="">http://hg.openjdk.java.net/jdk/client</a>><br class=""></blockquote><br class="">It looks like your JDK 10 run is finding a pre-existing:<br class=""><br class="">./JTwork/extraPropDefns/classes/requires/VMProps.class<br class=""><br class="">which was compiled by a later JDK. Try deleting that class file. Or better still use a different JTwork directory.<br class=""><br class="">David<br class=""><br class=""><blockquote type="cite" class="">Regards<br class="">Prasanta</blockquote></blockquote></blockquote></div></blockquote></div><br class=""></div></div></body></html>