1

I want to bundle Java application into a .deb package. Inside it is a jar launched with a java -jar $path/app.jar script. I need to specify in the package dependencies that it will require JRE >= 11. I've tried 2 options:

  • Depends: java11-runtime - here the package will be uninstallable because it depends on a virtual package.
  • Depends: default-jre | java11-runtime - now it will try to install default-jre which won't guarantee that it will be at least JRE 11.

1 Answer 1

3

I suggest using a versioned dependency on default-jre:

Depends: default-jre (>= 2:1.11) | java11-runtime

If your package doesn’t need the Java GUI packages, it should depend on the -headless variants instead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .