[Share Experiences] Solution to Linyaps Packaging: Java: not found
Experiences and Insight 621 views · 0 replies ·
deepin小助手
Super Moderator
OM
2024-12-02 05:57
Author
The following content is from the user @deepin-superuser,Thanks for the sharing!
Solution:
Complete JRE-related dependencies
Open <span>linglong.yaml</span>. You’ll notice that only <span>openjdk-11-jre</span> is added as a dependency. So, we need to add the remaining dependencies:
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 <span>linglong.yaml</span> file and add the following line at the end:
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:
<span>ll-builder build</span>
<span>ll-builder export</span>
<span>ll-builder run</span>
This is part of the series on solutions for Linglong packaging issues:
Solution for <span>start.sh: line 2: ./xxx: No such file or directory</span>
Solution for <span>xxx.so: cannot open shared object file</span>
The following content is from the user @deepin-superuser,Thanks for the sharing!
Solution:
Open
<span>linglong.yaml</span>
. You’ll notice that only<span>openjdk-11-jre</span>
is added as a dependency. So, we need to add the remaining dependencies:<span>ll-pica adep -d "ca-certificates-java,fonts-dejavu-extra,java-common,libatk-wrapper-java,libatk-wrapper-java-jni,libgif7,openjdk-11-jre-headless"</span>
After completing the dependencies, you may notice that Java is not installed in the bin directory. We need to copy it there. Edit the
<span>linglong.yaml</span>
file and add the following line at the end:<span>cp -r $PREFIX/lib/jvm/java-11-openjdk-amd64/* $PREFIX</span>
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:
<span>ll-builder build</span>
<span>ll-builder export</span>
<span>ll-builder run</span>
This is part of the series on solutions for Linglong packaging issues:
<span>start.sh: line 2: ./xxx: No such file or directory</span>
<span>xxx.so: cannot open shared object file</span>
<span>java: not found</span>