Snifx

Version 1.0
Spring Native Installable JavaFX application template
Snifx is a starter for developing Desktop Java FX applications with Spring. Deployable as ZIP(all platforms) or as OS native installers for Windows(exe, msi), Linux(rpm, deb) and MacOS(dmg, pkg, app).
  • Frontend in JavaFX
  • Backend in Spring core and Spring context (validated with 4.x and 5.x)
  • A Spring component is a JavaFX component at the same time
  • Packages as ZIP (java -jar ...) - Maven plugin in POM
  • Creates native OS installers (supports JRE bundle) - Maven plugin in POM
  • Contains a starter JavaFX controller(it is also a Spring component)
  • Contains some basic UI components
  • i18n ready - examples in English, French, German and Russian
  • Provides a default skin with sample images for styled buttons(OK, Cancel, etc.)
  • Application state if needed is under user's home directory
  • Open-source and completely Free!
GitLab
Hadjo for Hadoop - started from Snifx
Requirements:
The project can be compiled, packaged and installed on any OS that supports JDK with JavaFX. Usually JavaFX APIs are available as a fully integrated feature of the Java SE Runtime Environment and the Java Development Kit. See your version of JDK - ex. Oracle, OpenJDK.
Example Snifx usage:
Hadjo is an application built on top of Snifx. Packaged as a ZIP for all platforms with Java. Also provides native installers for Windows(exe), Linux(deb, rpm) and MacOS(dmg, pkg). Option to select installers with or without JRE bundle.

Get Started

Project Packages:

  • src/main/java - well, the Java code
  • src/main/java/com/lazyweaver/snifx/components/controller - your Spring/JavaFX components. There is a starter example "RootLayoutController".
  • src/main/resources/resources/fxml - FXML files for UI
  • src/main/resources/resources/i18n - internationalization files. Accommodates sample properties for English, French, German and Russian
  • src/main/resources/resources/skins - so far has one skin "default" with main.css and a couple of icon PNGs for styling buttons
  • src/main/deploy - consists of data related to native installers only. Contains sample PNG, BMP and other images that become present in installers and can be replaced by you. Config files include "YourApp" and "YourCompany" values that can be totally replaced. See some of the screenshots below

Howto

Package (all OS)

ZIP (java -jar ...)
  • StepGo to the root of the project and invoke mvn clean jfx:jar
  • ResultThe content of the ZIP will be placed under your project's "target/jfx/app". You are free to add bat, sh or other stuff if desired.

Create Native OS Installers (Windows)

EXE and MSI
  • Step (optional)If you want to have an EXE package of your application then install on your Windows for free Inno Setup.
  • Step (optional)If you want to have an MSI package of your application then install on your Windows for free WiX Toolset. MSI packages are generated using the Windows Installer XML toolset (also known as WiX). As of JavaFX 2.2, WiX 3.0 or later is required, and it must be available on the PATH. To validate, try running candle /? from the command line.
  • StepWhen the setup is ready on your WIndows, go to the root of the project and invoke mvn clean jfx:native
  • ResultThe native launcher(s) will be placed under your project's "target/jfx/native"

Create Native OS Installers (Linux)

DEB and RPM
  • Step (optional)If you want to have an RPM package of your application then install on your Linux for free rpmbuild.
  • Step (optional)If you want to have an DEB package of your application then install on your Linux for free dpkg-deb and fakeroot.
  • StepWhen the setup is ready on your Linux, go to the root of the project and invoke mvn clean jfx:native
  • ResultThe native launcher(s) will be placed under your project's "target/jfx/native"

Create Native OS Installers (MacOS)

DMG and PKG
  • StepNo special tools are needed to generate a DMG, PKG or App, just a decently recent version of OSX. Go to the root of the project and invoke mvn clean jfx:native
  • ResultThe native launcher(s) will be placed under your project's "target/jfx/native"

Screenshots

Contact

Contact Us

Snifx is free and thus we do our best to provide support for it.

You may contact us about general inquiries, to report bugs in the template or suggest features or improvements!

info@lazyweaver.com