Win a copy of Head First Go this week in the Go forum!
  • Post Reply Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Setting up an JavaFx program using SpringBoot  RSS feed

 
Master Rancher
Posts: 1163
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I was writting my thesis I wanted to use JavaFx as frontend but still have the advantage of SpringBoot, when talking to my instructor about it, he told me it couldn't be done, so I was actually pretty proud of myself when I found a way to do so. I created a basic setup that I reuse for every javaFxprogram I create, now I putted that setup on github and wanted to share the link, feel free to use as you please.
I used pretty generic names, so you'll only need to change the application.properties and pom.xml a bit and you're ready to go:
JavaFX-SpringBootsetup on github
 
Daniel Demesmaecker
Master Rancher
Posts: 1163
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should mention that this is build in java8, if you're using java 11, you'll have to add the open JavaFx dependencies and make some additional changes, which I will describe here once I have a bit more time.
If you having dificulties running the problem, 3 things you can check:
  • Make sure you added the program as an maven project (in intellij you can right click the pom and select add as maven project
  • Check which JDK you're using (JavaFx is since java11 no longer part of the standard jdk, but is available as sepperate download or maven dependency
  • Make sure you have adjusted the application.properties to use you connectionstring and password for the db, if you're not using an MysqlDB, or any db at all, you'l have to change the dependencies too
  •  
    Sheriff
    Posts: 5750
    149
    Chrome Eclipse IDE Java Postgres Database VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Daniel Demesmaecker wrote:...

  • Make sure you added the program as an maven project (in intellij you can right click the pom and select add as maven project

  • In Eclipse, right-click the project name, hover over Configure and select Convert to Maven Project.
     
    Daniel Demesmaecker
    Master Rancher
    Posts: 1163
    18
    Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I promissed you guys to look in to what changes needed to be done for migrating my SpringBoot-JavaFx setup from java 8, which included JavaFx in the jdk, to java 11, using the newer openJFX dependencies.
    The answer couldn't be more simple then just add the dependencies:


    To make it you guys even more easy, I putted the java11 version on github too, so here are the links again:
    Using Java8
    Using Java11
     
    Don't get me started about those stupid light bulbs.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!