I am creating hello world snap with java and maven (runs on my computer).
While trying to run the snap on the NanoPi-NEO2 with OS that based on ubuntu core 16 (friendlycore) I got the error:
/snap/smart-pi-snap/x1/usr/lib/jvm/default-java/bin/java: 8: /snap/smart-pi-snap/x1/usr/lib/jvm/default-java/bin/java: Syntax error: Unterminated quoted string
(smart-pi-snap is the name of the snap)
It seems that the there is no java on the device (and I can only install snaps) so I found
java-jre-ondra
which is
java 8 runtime snap
Info on the snap says
Java 8 run time snap, this snap is intented to be used by other snap_fileset
using content interface
But I cant understand how to use content interface.
snapcraft.yaml:
name: smart-pi-snap
#base: core18
version: '1.0.1'
summary: Hello World java maven
description: |
Simple Hello World delivered with java in snap package.
grade: devel
confinement: devmode
architectures: [all]
parts:
smart-pi-snap:
plugin: maven
source: .
maven-options: [package]
stage-packages: [openjdk-8-jre]
apps:
smart-pi-snap:
command: java -jar $SNAP/jar/HelloWorld.jar
plugs:
- content