我正在尝试为 JavaFX 应用程序创建一个 snap,但似乎无法弄清楚如何构造 yaml 文件。
我读到我需要使用该desktop-launch
命令,但我还需要调用 Java 的java -jar
命令。我不确定如何将这两件事放在一起。
无论如何,这是我当前的snapcraft.yaml
文件。
name: apuviewer # you probably want to 'snapcraft register <name>'
version: '1.0' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
Description
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
apps:
apuviewer:
command: desktop-launch $SNAP/apuViewer-1.0.jar
plugs: [home, network, x11]
parts:
apuviewer:
source: .
plugin: dump
after: [desktop-gtk3]
build-packages:
- ca-certificates
- ca-certificates-java
- openjdk-8-jre-headless
stage-packages:
- openjdk-8-jre-headless
目前正在抛出这个错误:
/snap/apuviewer/x1/bin/desktop-launch: line 545: exec: /snap/apuviewer/x1/apuViewer-1.0.jar: cannot execute: Permission denied
我尝试了很多不同的方法,但似乎无法让它运行。任何帮助都非常感谢!