• Post Reply Bookmark Topic Watch Topic
  • New 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Deploying JavaFX applications

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I'm moderately new to the world of JavaFX and really liking it so far!  Having written some apps, I'm looking at deploying them and have had some success with using jPackage and the gradle badass jlink plugin https://badass-jlink-plugin.beryx.org/releases/latest/

In my gradle scripts, I'm using the javafx plugin which is making fetching what I need from mavenCentral nice and easy https://github.com/openjfx/javafx-gradle-plugin

One thing I have noticed is that when I run a JavaFX application it unpacks native libraries to the .openfjx directory in my home.  I personally don't have an issue with this, but I'm wondering if this is generally considered acceptable for deployed applications?  I've been looking at the local javafx SDK option which works differently in that it doesn't unpack the native libraries from the jar.  https://github.com/openjfx/javafx-gradle-plugin#5-using-a-local-javafx-sdk.  Is this local SDK version considered just for custom builds of JavaFX or is this intended for deployed JavaFX applications which don't unpack to the .openjfx directory?

I guess my main concern with an app which unpacks native libraries to the .openjfx directory is someone might not have sufficient user permissions and the app fails.  Am I unnecessarily concerned about this?
 
Saloon Keeper
Posts: 15731
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't realize OpenJFX does this. I would be pretty peeved about this as well. I had assumed that you'd just build a different version for every target platform that includes all the native libraries.

Not all is lost though. Since OpenJFX 12, there is a JVM variable you can set to determine the location of this cache directory. You can set it to a value that is appropriate for your application and target platform.
 
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic