[Share Experiences] Solution to Linyaps Packaging: Java: not found
Tofloor
poster avatar
deepin小助手
Super Moderator
OM
2024-12-02 13:57
Author

The following content is from the user @deepin-superuser,Thanks for the sharing!

Solution:

  1. Complete JRE-related dependencies
    Open linglong.yaml. You’ll notice that only openjdk-11-jre is added as a dependency. So, we need to add the remaining dependencies:

ll-pica adep -d "ca-certificates-java,fonts-dejavu-extra,java-common,libatk-wrapper-java,libatk-wrapper-java-jni,libgif7,openjdk-11-jre-headless"

  1. Copy JRE to the bin directory
    After completing the dependencies, you may notice that Java is not installed in the bin directory. We need to copy it there. Edit the linglong.yaml file and add the following line at the end:

cp -r $PREFIX/lib/jvm/java-11-openjdk-amd64/* $PREFIX

  1. Fix startup command
    Some startup scripts use absolute paths for commands, but the paths in Linglong have changed. We need to modify them to the correct paths.

Then, as usual, run the tests:

ll-builder build

ll-builder export

ll-builder run

This is part of the series on solutions for Linglong packaging issues:

  • Solution for start.sh: line 2: ./xxx: No such file or directory
  • Solution for xxx.so: cannot open shared object file
  • Solution for java: not found
Reply Favorite View the author
All Replies

No replies yet