/ DataFX / How to set up a DataFX application

How to set up a DataFX application

Hendrik on 2015/01/28 - 21:04 in DataFX, JavaFX

A lot of people start using DataFX in small projects without a build file and by doing so they sometimes use old builds. Because of that I will give you some hints how to setup a project that is using DataFX.

DataFX builds

Every stable DataFX build can be found at Maven Central. If you are new to Maven or Maven Central just open this link. On the page you will find all artifacts of DataFX. If you for example want to use DataFX core you can download the jar, sources and javadoc here.

maven central

Each DataFX artifact is defined by the group-id, artifact-id and version. The group-id is always “io.datafx” and the artifact-id depends on the DataFX-Module. If you for example want to create an application that is suing the DataFX Flow you need the datafx-flow module and all it’s dependencies. At the moment the last stable version is 8.0.

If you want to download the DataFX jars by hand and add them to your application you need to download all dependencies of the module, too. Thankfully DataFX doesn’t have much dependencies. Here is an overview:
datafx-dep.016

Once you have downloaded the last version of DataFX and added the jars to the class path of your application you can start coding.

Using builds tools

Normally you won’t download the dependencies of your application manually. Build tools like Maven or Gradle can do this job for you. By using one of the tools you only need to define the dependencies in your build file and the build tool will automatically download all needed jars. In addition the tools support transitive dependencies. This allows you to avoid needing to discover and specify the libraries that your own dependencies require, and including them automatically. If you Maven as build tool and you only want to add the DataFX Flow API to your application you only need to add one dependency:

Use DataFX in your application

Once you added DataFX as dependency to your application you can using it as described in the tutorials.

3 POST COMMENT

Send Us A Message Here

Your email address will not be published. Required fields are marked *

3 Comments
  • 2015/06/20

    Hi
    can someone give me a sample example on how to retrieve data using JDBC and DataFX
    thanks a lot

    Jemli Fathi
    Reply
  • 2016/08/14

    Do you know how import the whole DataFX dependencies with gradle ?

    codeur
    Reply
  • 2017/03/16

    Greetings.
    Thanks for this advancement. DataFx tutorials are really rear. You have helped me a lot. Can I use DataFx with Spring Boot? How?

    Samson Ssali
    Reply