This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization 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
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Setting up an JavaFx program using SpringBoot  RSS feed

 
Rancher
Posts: 1170
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
Rancher
Posts: 1170
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: 5924
    155
    Chrome Eclipse IDE Java Postgres Database Ubuntu 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
    Rancher
    Posts: 1170
    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
     
    Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
    Create Edit Print & Convert PDF Using Free API with Java
    https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!