<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Currently, asmtools is built using JDK 21 (LTS). If you prefer to continue using JDK 17, I can downgrade the build version to align with jtreg. A few changes can be integrated over the next few days.</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Leonid</div>
<div id="mail-editor-reference-message-container">
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing"></div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
<b><br>
<p style="font-family:Calibri;font-size:10pt;color:#000000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
Confidential- Oracle Internal<br>
</p>
From: </b>Jaikiran Pai <jaikiran.pai@oracle.com><br>
<b>Date: </b>Thursday, December 11, 2025 at 5:54 PM<br>
<b>To: </b>Leonid Kuskov <leonid.kuskov@oracle.com>, asmtools-dev@openjdk.org <asmtools-dev@openjdk.org><br>
<b>Subject: </b>Re: Does "-cv" option to jasm tool override the class file version in jasm file?<br>
<br>
</div>
<div class="moz-cite-prefix">On 12/12/25 3:19 am, Leonid Kuskov wrote:</div>
<blockquote>
<p dir="ltr" class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; text-indent: 0px;">
<span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">In typical usage, a
<code>.jasm</code> file explicitly specifies the class-file version in its header, for example:</span></p>
<pre><div dir="ltr" class="overflow-y-auto p-4" style="text-align: left; text-indent: 0px; font-size: 12pt; color: rgb(0, 0, 0);"><code>test.jasm
public super class test version 55:0 {}
</code></div></pre>
<p class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; text-indent: 0px;">
<span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">If the version isn't specified in the file,
<code>jasm</code> defaults to 45.3.</span></p>
<p class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; text-indent: 0px;">
<span style="font-size: 16px;">When a version is present in the </span><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><code style="font-family: Aptos, Arial, Helvetica, sans-serif;">.jasm</code></span><span style="font-size: 16px;"> file,
 the </span><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><code style="font-family: Aptos, Arial, Helvetica, sans-serif;">-cv</code></span><span style="font-size: 16px;"> option
</span>doesn’t override<span style="font-size: 16px;"> it. For example, given a header such as:</span></p>
<pre><div dir="ltr" class="overflow-y-auto p-4" style="text-align: left; text-indent: 0px; font-size: 12pt; color: rgb(0, 0, 0);"><code>public super class test version 55:0 {}
</code></div></pre>
<p class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; text-indent: 0px;">
<span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">and the command:</span></p>
<pre><div dir="ltr" class="overflow-y-auto p-4" style="text-align: left; text-indent: 0px; font-size: 12pt; color: rgb(0, 0, 0);"><code>jasm -cv 66.0 -w . test.jasm
</code></div></pre>
<p class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; text-indent: 0px;">
<span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">the generated class file will still use version 55.0, because the version defined in the source takes precedence.</span></p>
</blockquote>
<p class="ms-outlook-mobile-reference-message skipProofing">Thank you Leonid, this is what I had hoped -cv would be, but got confused by the comment in that Main.java code. Thank you for confirming.</p>
<blockquote>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Leonid</div>
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
BTW: The latest asmtools release is 9.1, which is preferable to version 8.1 for new or updated workflows.</div>
</blockquote>
<p class="ms-outlook-mobile-reference-message skipProofing">I will take this up with the jtreg dev team and see if we should upgrade to it. One thing that's important for jtreg is the ability to use this library on older Java versions. asmtools 8.1 requires
 Java 17 runtime and when we upgraded jtreg to use 8.1 of asmtools, we had to enforce Java 17 as the minimum to build and launch the jtreg tool.</p>
<p class="ms-outlook-mobile-reference-message skipProofing">-Jaikiran</p>
</div>
</body>
</html>