Does "-cv" option to jasm tool override the class file version in jasm file?
Jaikiran Pai
jaikiran.pai at oracle.com
Fri Dec 12 01:53:59 UTC 2025
On 12/12/25 3:19 am, Leonid Kuskov wrote:
>
> In typical usage, a |.jasm| file explicitly specifies the class-file
> version in its header, for example:
>
> |test.jasm public super class test version 55:0 {} |
>
> If the version isn't specified in the file, |jasm| defaults to 45.3.
>
> When a version is present in the |.jasm| file, the |-cv| option
> doesn’t override it. For example, given a header such as:
>
> |public super class test version 55:0 {} |
>
> and the command:
>
> |jasm -cv 66.0 -w . test.jasm |
>
> the generated class file will still use version 55.0, because the
> version defined in the source takes precedence.
>
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.
> Leonid
> BTW: The latest asmtools release is 9.1, which is preferable to
> version 8.1 for new or updated workflows.
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.
-Jaikiran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/asmtools-dev/attachments/20251212/5d75accd/attachment-0001.htm>
More information about the asmtools-dev
mailing list