Coder Social home page Coder Social logo

JRE bundling about javafx-gradle-plugin HOT 3 CLOSED

fibrefox avatar fibrefox commented on May 18, 2024
JRE bundling

from javafx-gradle-plugin.

Comments (3)

FibreFoX avatar FibreFoX commented on May 18, 2024

The usage of a fat-jar is really not recommended. For distribution you can create native bundles, which do contain the specific JRE, that you are bundling with.

I do know the idea of "not bundling the JRE, because of its size", but it comes with a lot of drawbacks:

  • you depend on the user installed JRE, if there isn't any, the application fails
  • you depend on the user installed JRE, and you can not check, if the version does work with your application ... otherwise you have to check java-version on startup to make sure there is everything implemented (like dialogs, or other features which came with later update-versions of java)
  • you have to test your application with all available java-versions, to make sure being able to reproduce bug-issues
  • dependency-hell
  • java bugs

The idea behind java-packager is, that you have a full-feature-complete bundle for distribution. If you choose otherwise, you might fail to provide a nice user-experience.

About that "multiple java versions"-question: the runtime is located below the application-folder, the native launcher is checking the generated .cfg-file which runtime to choose, and if there is something there, it tries to load DLL-files/SO-files from there. If the runtime isn't specified, the native launcher tries to locate some local installed JRE, if that ultimately fails too, the launcher panics and wont start anything.

To solve your issue:
create two different tasks where you generate both: with JRE-bundled and without JRE-bundled, but keep in mind that there IS some update-mechanism with some native installers. The generated GUID is random, but can be fixed in two ways (at least for windows):

  • by adding the identifier:
jfx{
    // choose your GUID to disable random-generation
    identifier = "{7a813ac5-f07e-4134-b879-82be0512eed8}"
}
  • by copying the first generated installer-source-files (use --info-level and set verbose to true), the javapackager informs you about the location, which is usually below your temp-folder

If this satisfies your question, please close this issue ;)

from javafx-gradle-plugin.

FibreFoX avatar FibreFoX commented on May 18, 2024

@Lewik any progress on this issue?

from javafx-gradle-plugin.

Lewik avatar Lewik commented on May 18, 2024

@FibreFoX I'm to busy at the main work.
We will try this plugin as soon as possible. If you want - you may close question now. I'll try it anyway.

from javafx-gradle-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.