minimalPkg icon indicating copy to clipboard operation
minimalPkg copied to clipboard

Sample for creating a Java based package

Open col-panic opened this issue 8 years ago • 3 comments

Hy there,

could you please provide a link or a respective sample for a minimal Java-based package to integrate?

Thank you

col-panic avatar Jan 19 '17 21:01 col-panic

Hi,

You can follow synology developer guide for more detail.

There are some tips for java-base package integration:

  1. In SynoBuildConf/build, you can use /usr/lib/jvm/java-6-jdk/bin/javac to compile your .java source.
  2. In INFO file, install_dep_packages need to depends on Java8 (synology package).
  3. In scripts/start-stop-status, use /var/packages/Java8/target/j2sdk-image/bin/java, which is installed by Java8 package, to run compiled code.

Thanks.

SynologyOpenSource avatar Jan 23 '17 08:01 SynologyOpenSource

Thanks a lot! I will try.

Another question. Does there exist a way to integrate an application "synology style" while the application itself is delivered via Docker? So for example, by installing a synology package the result is a fully configured and started docker image?

col-panic avatar Jan 23 '17 08:01 col-panic

Hi,

I think the following tips will help you to create package via docker.

  1. Nothing need to do while build time (assume docker image is built by docker hub).
  2. In INFO file, install_dep_packages need to depends on Docker (synology package).
  3. In scripts/start-stop-status, use /usr/local/bin/docker to pull/run image as an application.

Thanks.

SynologyOpenSource avatar Jan 23 '17 10:01 SynologyOpenSource