FS#78279 - [jre-openjdk-headless] A jar file is not the one used while building the shared archive file

Attached to Project: Arch Linux
Opened by Claudio Nave (EvaristeGalois11) - Friday, 21 April 2023, 21:19 GMT
Last edited by freswa (frederik) - Tuesday, 25 April 2023, 10:57 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To freswa (frederik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:

Hello, after updating to jdk 20 I noticed that java emits two warnings every time is started:
[0.010s][warning][cds] A jar file is not the one used while building the shared archive file: /usr/lib/jvm/java-20-openjdk/lib/modules
[0.010s][warning][cds] /usr/lib/jvm/java-20-openjdk/lib/modules timestamp has changed.

Additional info:
* package version(s) 20.0.1+9

Steps to reproduce:
After installing jre-openjdk-headless run java -version to see the warnings

Thank you for your work!
This task depends upon

Closed by  freswa (frederik)
Tuesday, 25 April 2023, 10:57 GMT
Reason for closing:  Fixed
Additional comments about closing:  jre-openjdk-headless-20.0.1.u9-3
Comment by Toolybird (Toolybird) - Friday, 21 April 2023, 22:37 GMT
It's only a warning. Does everything still work?
Comment by Claudio Nave (EvaristeGalois11) - Friday, 21 April 2023, 23:09 GMT
Yes it does seem to work, but a warning it's well a warning that something is wrong right?

No other version/vendor/distro emits this same warnings so it's a bit strange imo
Comment by Claus Klingberg (cjk) - Monday, 24 April 2023, 17:10 GMT
This may only be a warning, but it's breaking all kinds of functionality, like piping Java-program output to a file / other program. It's emitted on stdout, I suppose, so this is no fun.

There are possible workarounds (e.g. https://bbs.archlinux.org/viewtopic.php?pid=2095937#p2095937 ) but this also means the package is doing something the official distribution doesn't.
Comment by Claudio Nave (EvaristeGalois11) - Monday, 24 April 2023, 19:07 GMT
Ah I didn't think about the warnings potentially messing with the pipes!

Regarding the possible workaround, as I already stated in the forum, replacing the lib folder basically means uninstalling the official package and replacing with the OpenJDK binaries from Oracle.
I think it's just better to use the corresponding AUR instead of mix and matching random things.
Comment by freswa (frederik) - Monday, 24 April 2023, 22:10 GMT
Please try jre-openjdk-headless-20.0.1.u9-3 from [testing] and give feedback. Thanks!
Comment by George Rawlinson (rawlinsong) - Tuesday, 25 April 2023, 01:34 GMT
jre-openjdk pkgrel #3 looks good to me. No more warnings are being emitted.
Comment by Claudio Nave (EvaristeGalois11) - Tuesday, 25 April 2023, 06:46 GMT
I tried jdk-opendjk with src and doc and everything works fine. I can compile and run all my projects. The warnings are indeed gone. Big thank you from me!
Comment by Claus Klingberg (cjk) - Tuesday, 25 April 2023, 10:31 GMT
Sorry for the noise, didn't know page-reloading re-posts the comment :(
Comment by Claus Klingberg (cjk) - Tuesday, 25 April 2023, 10:32 GMT
Sorry for the dupe and thanks for the quick fix!

Loading...