compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

jlink error

Open zoga-com opened this issue 2 years ago • 4 comments

Describe the bug Doesn't compile with jlink error.

> Task :createRuntimeImage FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':createRuntimeImage'.
> External tool execution failed:
  * Command: [/usr/lib/jvm/java-17-openjdk-17.0.6.0.10-1.fc38.x86_64/bin/jlink, @/home/dima/IdeaProjects/minecraft-launcher/build/compose/tmp/createRuntimeImage.args.txt]
  * Working dir: []
  * Exit code: 2
  * Standard output log: /home/dima/IdeaProjects/minecraft-launcher/build/compose/logs/createRuntimeImage/jlink-2023-06-05-11-21-31-out.txt
  * Error log: /home/dima/IdeaProjects/minecraft-launcher/build/compose/logs/createRuntimeImage/jlink-2023-06-05-11-21-31-err.txt

Error log is empty. Output log:

Error: --module-path is not specified and this runtime image does not contain jmods directory.
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
Use --help for a list of possible options

Affected platforms Select one of the platforms below:

  • Desktop

Versions

  • Kotlin version*: 1.8.0
  • Compose Multiplatform version*: 1.3.0
  • OS version(s)* (required for Desktop and iOS issues): Fedora 38
  • OS architecture (x86 or arm64): x86
  • JDK (for desktop issues): 17.0.6

To Reproduce Steps and/or the code snippet to reproduce the behavior:

  1. Create Compose project on IDEA
  2. Go to project
  3. Compile with ./gradlew package
  4. See error

Expected behavior App compiled.

Screenshots image

Additional context

zoga-com avatar Jun 05 '23 08:06 zoga-com

Can you give us more context? Maybe post a reproducer project on github so we could check it out?

m-sasha avatar Jun 20 '23 13:06 m-sasha

I know the cause of the problem, It is because I am using the bundled java jdk (jbr). It dosent have the jmods directory. Changing the jdk to openjdk (or iguess to any jdk that have jmods directory) fixed the problem

OliverRhyme avatar Jul 02 '23 04:07 OliverRhyme

I know the cause of the problem, It is because I am using the bundled java jdk (jbr). It dosent have the jmods directory. Changing the jdk to openjdk (or iguess to any jdk that have jmods directory) fixed the problem

Thanks! Fixed the problem

RandyWei avatar Jul 28 '23 09:07 RandyWei

Check https://github.com/JetBrains/JetBrainsRuntime.

Goooler avatar Jun 19 '24 03:06 Goooler

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

okushnikov avatar Aug 26 '24 13:08 okushnikov