Jar file is not getting copied to particular location in snaps

i am building a snap buga-stock

name: buga-stock
version: "0.6.3"
summary: A Java application for downloading OpenStreetMap tiles 
description: |
 jTileDownloader allows downloading OpenStreetMap files for offline
 map caching
confinement: strict

apps:
    buga-stock:
        command: bin/launcher.sh
        plugs: [home, x11, network, network-bind]

parts:
    buga-stock:
        source:  https://roman.convertio.me/p/-Q6HjFZ92MSXP--foEcFHw/bc8024da9ad32d3cd10b52824ead1715/buga-stock.zip
        plugin: dump
        stage-packages: [ openjdk-8-jre]
    launcher:
        source: .
        plugin: dump
        organize:
         launcher: bin/launcher.sh

i am getting the error with this.

umang@umang-HP-15-Notebook-PC:~/Desktop/work/test17$ /snap/bin/buga-stock
Error: Unable to access jarfile /snap/buga-stock/x1/buga-stock/buga-stock.jar

unable to acces the jar file.
@lucyllewy @kyrofa

well where is the file if it’s not in the right place? is it missing altogether or is it just in a place that isn’t $SNAP/buga-stock/buga-stock.jar?

If it’s just in the wrong place then you can either alter your .sh file to use the actual location, or use organize to move it to the right place.

If it’s not in the snap at all then you need to check that the zip file does contain the .jar file, and fix it if it doesn’t.

1 Like