Search code examples
javajavafx-8deb

How to require Oracle Java (JRE) when building a .deb (debian package)?


I wrote a small BTRFS GUI in Oracle Java that uses JavaFX. So in orded for the program to work Oracle Java (JRE) must be installed (not Openjdk-jre!). How can I require that when building the .deb package under the control file?


Solution

  • Debian has an OpenJFX package for Java 8, which you can install in addition to the standard OpenJDK package.

    Debian's OpenJFX package brings JavaFX capabilities to Debian based systems (and can be used as an alternative to installing Oracle JDK 8+ which also includes JavaFX capabilities implicitly).

    I don't use Debian, so I do not know if the Debian OpenJFX includes the standard Java client packaging tools (it should and probably does, but if it doesn't you could contact the package maintainers). With those tools, on a Debian system, you can build a self-contained application which is deployable as a .deb (debian package). Or you can just use the OracleJDK for your development and build a self-contained application based upon that. With a self-contained application, users of your application do not need to have any kind of Java pre-installed on the system (as the required Java runtime is included in your application package).

    Related Question