Java jar manifest file with unrecognized fields

177 Views Asked by At

I am working on migration my application to java9, I found that I can set Add-Opens in my manifest file to open some java internal packages for reflection usage. I am thinking fields like Add-Opens are only support after java9, so I wonder what will happen if I run it using lower version like java8. Will those unrecognized fields (general unrecognized fields not specific to Add-Opens) in the manifest file be ignored in java8? What impact they can have on the application when running on java8? Thank you.

1

There are 1 best solutions below

1
askaquestion On

Thanks for VGR's comment, this link for oracle official document on manifest states that Attributes which are not understood are ignored. Such attributes may include implementation specific information used by applications.

Reference: https://docs.oracle.com/en/java/javase/18/docs/specs/jar/jar.html#overview