Comments (3)
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 setverbose
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.
@Lewik any progress on this issue?
from javafx-gradle-plugin.
@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)
- StackOverflow when running jfxJar and jfxRun HOT 1
- Smart way to make multiple builds ? HOT 1
- Icon is not picked up HOT 11
- java.nio.file.NoSuchFileException when running jfxNative in Windows HOT 6
- Deb package throws "ValidatorException: No trusted certificate found" HOT 6
- Initial build on NetBeans fails. HOT 11
- Java 10 jvmArgs not working HOT 1
- Javafx native app not working on Windows x32 HOT 2
- Debian bundler prefix installation directory HOT 3
- Adding additional configuration folder
- Finder got an error: Canβt get disk (-1728) HOT 2
- Fix Deprecation warnings HOT 1
- Execute codesign with force flag
- Java 11 Support HOT 2
- Add support for gradle java-library & its fine grained scopes
- jfxNative problem with openJDK HOT 9
- Make it compatible with Gradle 6.0 in future release HOT 6
- Multi project application - icon is not used HOT 4
- Current InnoSetup on Windows is incompatible with the default .iss file MinVersion value HOT 3
- Couldn't find Ant-JavaFX library HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javafx-gradle-plugin.