gluonfx-maven-plugin: Download from link failed with status: 404, in version 1.0.24
Hi, I got this error on my Windows, when upgrade to version 1.0.24:
java.lang.RuntimeException: Error downloading zips: java.io.IOException: Error downloading link from https://github.com/gluonhq/vmone/releases/download/gvm-24-2/vmone-windows-x64.zip. Unexpected status code: 404
at com.gluonhq.substrate.util.FileDeps.setupDependencies(FileDeps.java:334)
at com.gluonhq.substrate.util.FileDeps.resolvePath(FileDeps.java:174)
at com.gluonhq.substrate.util.FileDeps.getJavaFXSDKLibsPath(FileDeps.java:106)
at com.gluonhq.substrate.target.AbstractTargetConfiguration.processClassPath(AbstractTargetConfiguration.java:788)
at com.gluonhq.substrate.target.AbstractTargetConfiguration.validateCompileRequirements(AbstractTargetConfiguration.java:392)
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 31 (6 by maintainers)
TLDR: you have to use 1.0.23 (@jperedadnr can you confirm?)
Background: Last week, I archived the vmone repo. I got more complaints than constructive contributions, so I consider it a failed experiment.
It was never intended to be something that was used in public, as it was mainly experimental work. The background: the stack that this plugin uses, requires a combination of a specific fork of a GraalVM version, a specific build of a fork of OpenJDK and some patched logic for dealing with mismatches. Most of this work is due to the fact that the VM code is spread over different places:
It’s extremely difficult to get all those separate parts to work together. Imho, the better solution is to have a single repository where JavaFX on mobile is considered a first class citizen. This is what I hope to achieve in OpenJDK/Mobile. All other efforts are by definition running behind, and take huge efforts to be maintained.
(thanks for your understanding)
Unfortunatly! Windows is not supported yet by Gluon plugins e.g. 1.0.24 and above! https://github.com/gluonhq/substrate/issues/1284
What is your development environment? e.g. Windows, Linux or MacOS?
I am basically using Windows 10 & WSL (Ubuntu)!
Clone (git clone) or fork, official git repo e.g.
I use TortiseSVN or TortiseGit to manage SVN and Git repos! For Development I use IntelliJ idea, VSCode, Notepad++ and Visual Studio
You can use eclipse
temurin jdkYou can learn a lot from AI Chatting Platfrom e.g. ChatGPT
But before digging into development steps, I want to know that vmone comes back e.g. https://github.com/gluonhq/vmone/releases/tag/gvm-24-2.1
So I think, you can use gluonfx plugins GluonFX v1.0.24 or v1.0.25 but as mentioned befor, these are not 100% ready at development side!
Notice that GluonFX 1.0.23 requires GraalVM 17 from https://github.com/gluonhq/graal/releases/tag/gluon-22.1.0.1-Final, as long as JDK 17 and JavaFX 21-ea.
@johanvos apologies for the spam tag, but I feel that without direct tag this otherwise may get lost in a sea of GitHub mails.
I don’t know anything about the Apple ecosystem, but I don’t see how dynamic code generation comes into play here.
native-imagegives us a native binary, which is hard to reverse engineer. We do not provide jars to clients as that both requires a JVM runtime on the client machine (I know there are packaging options to redistribute the JVM, but still), and jars would be easy to decompile by bad actors, or competitors looking for a creative source of inspiration.I agree maintainability is key here, which is the reason I created https://github.com/gluonhq/substrate/issues/1315 as the requirement for a custom plugin creates maintainability overhead.
Please let me know how you prefer I contact you, we have had contact previously on the GraalVM slack fyi. My thougths on how to move forward basically boil down to https://github.com/gluonhq/substrate/issues/1315, but I have no view on the requirements for mobile and the limitations imposed by native-image on mobile.
@kkriske (and others in this thread) Thanks, that makes things a bit more clear. I’m still trying to understand a few things though. We have to think about it (and with “we” I mean you, me, and others who are interested). The reason we did a JavaFX - GraalVM integration was the need of an AOT compiler, after RoboVM went out of business. Unfortunately, Apple still does not allow to execute dynamically generated code on their devices, and in the spirit of WORA, one of the greatest things about Java, I still believe we somehow have to make sure Java runs first-class on iOS devices – which is why we created all this stuff and “integrated” an AOT compiler.
That is a very different usecase than what you describe, but that doesn’t mean your usecase is less relevant – it’s just something we didn’t consider when starting this. But I’d like to learn more about that usecase (from you and others). What exactly do you mean with “source code protection”? If it is what I believe it is, there might be a few options to support this. To choose which option is best, one of the most important things to me is maintainability. Everything we do in this area is free, and free resources are of course limited. The json-list for jni/reflection configuration is a maintenance nightmare, as are many other things with the current approach – but especially for non-mobile, we can do much better and have a more maintainable approach.
This is probably getting way too off-topic for this issue, but please contact me off-line with thoughts and ideas about this, so that we can move forward.
@johanvos We don’t support mobile, only Windows desktop (and Linux experimentally) with a legacy JavaFX UI. Most of the software is actually just a CLI tool intended for computationally heavy workloads. The main requirement for GraalVM native-image is the source code protection it provides by compiling to native. Everything else is nice to have but not the root requirement. I haven’t done research on the topic in a while for as far as I know native-image is the only tool that provides that functionality in that capacity.
While you’re right everything is open source, and I’ve made some contributions myself, if Gluon no longer provides the minimal support, e.g. the reflection/JNI config files, there would be a significantly higher maintenance cost for everyone. While we can still contribute that to e.g. the official GraalVM reachability metadata repository, it’s way easier to keep config up to date as a core maintainer of javafx than as a random developer that needs to reverse engineer what’s going on. JavaFX is also quite reflection/JNI heavy which makes it all the more painfull if we need to rely on oss contributions for that.
To me it sounds like the biggest problem with native-image is mobile, and for desktop it should be fine to support native-image. The reason I created https://github.com/gluonhq/substrate/issues/1315, and thus what I’m missing for better GraalVM support, is to align JavaFX with how a library should behave in native-image. And by that I mean provide features and embedded configuration files in the actual JavaFX artifacts so a build does not require the custom gluonfx-maven-plugin at all. Our build passes over 50 additional
linkerArgsoptions to the gluonfx plugin that are normally configured out of the box by native-image, but since JavaFX does it’s own linking step, we need to put additional effort in trying to keep that in sync with the GraalVM codebase.In the current setup, if I understand everything correctly, the native-image configuration is not published in the official artifacts, and since the plugin does static linking of native libraries, there are custom artifacts downloaded as well, since the official ones only container dynamically linked libraries. So a lot of magic going on under the hood. For desktop applications it should be fine to just use dynamic linking so the whole custom linking step is unnecessarily complex in my humble opinion.
Hi @kkriske , No, you shouldn’t be locked at the current versions. Unless I’m missing something, everything is open source and available. Personally, I don’t see the benefits of using GraalVM for JavaFX anymore, compared with the effort it takes – especially if you want to support mobile using the same codebase. If others still do prefer that approach, that’s all great of course, and I don’t think there is any hurdle preventing others (e.g. you?) to follow that path. If there is anything missing, let me know.
@ctoabidmaqbool Can you provide any guidance for setting up my own environment for following your process?
@ctoabidmaqbool I don’t see any comeback from the Gluon Team in the near future. So, if there are no security restrictions, I can set up those forks and use those. Would love to know your process. Thank you for your great help 🙏!
Thanks for your kind words, @SaptarshiSarkar12 ! 😀
If you still want to work with GluonFX v1.0.24+, JDK 23, and VMOne — just like I am — it is possible to set up and build everything locally with some manual adjustments.
The key is to be a bit hands-on and comfortable tweaking things in your local environment, especially if you want to explore or experiment with advanced configurations.
For reference, I’ve created and maintain some personal forks of the related repositories to help with this process:
These forks allow me to patch, update, and experiment with configurations that are not officially supported. It’s a bit of work, but if you’re comfortable with building the full stack from source and keeping up with upstream changes, it can be done.
That said, it’s not the easiest route — but definitely possible for power users who want to keep pushing forward.
Let me know if you’d like any pointers or guidance on setting up your own environment like this! 🚀
@ctoabidmaqbool Thanks for the detailed comment 😀. Yeah, I also saw just now and I’m stuck as I can neither downgrade to JDK 17 (because my OSS project uses JDK 21 features) not can I upgrade to JDK 23 which leads to missing VMOne. Let’s wait until the team and contributors come up with success.
@johanvos Moreover I think, Gluonhq must support all major platforms like it was for
1.0.23e.g. Windows, Linux, macOS, Android, IOS, recent plugins e.g. 1.0.24 and 1.0.25 was lacking support for Windows(x64) and Linux (AArch64). https://github.com/gluonhq/gluonfx-maven-plugin/issues/518#issuecomment-2677804403I think there should be easy way to make native-image for all major platform by liverging Graalvm native-image.
As now it exposed that 1.0.24 and 1.0.25 are for expiremetal pupose not for production ready, so how much it expacted to use Graalvm (java 23+) production ready> ,
Faced this exact same error in my local Ubuntu machine in 1.0.25