3

I'm trying to create a snap for a JavaFX application, but I can't seem to figure out how to structure the yaml file.

I've read that I need to use the desktop-launch command, but I also need to call Java's java -jar command. I'm not sure how to put these two things together.

Anyway, here's my current snapcraft.yaml file.

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

It's currently throwing this error: /snap/apuviewer/x1/bin/desktop-launch: line 545: exec: /snap/apuviewer/x1/apuViewer-1.0.jar: cannot execute: Permission denied

I've tried many different things, but can't seem to get it to run. Any help is much appreciated!

Sam
  • 81

0 Answers0