Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jlink fails with 'Invalid JMOD file' on macOS 10.15.2 #77

Closed
brownms opened this issue Jan 23, 2020 · 4 comments
Closed

jlink fails with 'Invalid JMOD file' on macOS 10.15.2 #77

brownms opened this issue Jan 23, 2020 · 4 comments

Comments

@brownms
Copy link

brownms commented Jan 23, 2020

Describe the bug

Unable to run jlink to create a modular JRE using the latest release 11.0.6.10.1-1 for macOS.

Error: java.io.IOException: Invalid JMOD file: [redacted]/amazon-corretto-11.jdk/Contents/Home/jmods/jdk.jartool.jmod

To Reproduce

  1. Download the 11.0.6.10.1-1 build of Corretto JDK for macOS
  2. tar xzf amazon-corretto-11.0.6.10.1-1-macosx-x64.tar.gz
  3. cd amazon-corretto-11.jdk/Contents/Home/bin
  4. ./jlink --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.naming,java.prefs,java.scripting,java.security.jgss,java.sql,java.xml,java.xml.crypto --output my-jre

Expected behavior

JRE should be created in directory amazon-corretto-11.jdk/Contents/Home/bin/my-jre

Platform information

OS: macOS 10.15.2 (Also reproduced on macOS 10.13.6)
Version:
    openjdk 11.0.6 2020-01-14 LTS
    OpenJDK Runtime Environment Corretto-11.0.6.10.1 (build 11.0.6+10-LTS)
    OpenJDK 64-Bit Server VM Corretto-11.0.6.10.1 (build 11.0.6+10-LTS, mixed mode)

Additional context

This appears to affect only macOS. Creating a JRE with Windows and Linux works as expected.

@ziyiluo
Copy link
Contributor

ziyiluo commented Jan 23, 2020

@brownms We were aware of this issue. A release to fix the broken jmod files in macOS build is scheduled today. We will update this issue when the release is out.

@brownms
Copy link
Author

brownms commented Jan 23, 2020

@ziyiluo Thanks for the update.

@ziyiluo
Copy link
Contributor

ziyiluo commented Jan 23, 2020

@brownms The release is out. Please download the latest mac artifacts from our release page to verify that it addresses the issue.

@brownms
Copy link
Author

brownms commented Jan 24, 2020

@ziyiluo Confirmed latest mac artifact fixes the problem. jlink works as expected. Thanks!

@brownms brownms closed this as completed Jan 24, 2020
lutkerd pushed a commit to lutkerd/corretto-11 that referenced this issue Jun 29, 2022
lutkerd pushed a commit to lutkerd/corretto-11 that referenced this issue Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants