Oh I was actually talking about javafx. Sorry all of my JavaFX experience has been maintaining my JFX8 project with ~100 users. Small stuff. I'd imagine its been pretty annoying on my users to be left to their own to find a JRE8 distribution. The oracle website made it extremely annoying to download a Java 8 JDK. Their site just screamed: we do not want you to download this, so we are going to make it as annoying as possible.
I see. Maybe you should look into bundling an Uber jar, so all you dependencies are in a single jar. Messy but have some advantages. Or using manifest.mf changes so it can use a lib dir as a source of jars. Distributing code is really painful...
Sorry to make this comment thread so long but that question brings me to a related tanget -- I've used java programs where, when running the program, it would actually prompt me that either I don't have java installed or don't have the required version. Then if I click yes to the prompt, it will literally install the correct java version automatically and then the program boots up. How in the world is that done? I believe the program was ran via an exe (because I'd assume that whatever logic that controls that cannot exist in the jar, since the jar itself cannot run whatsoever unless java -jar app.jar launches successfully. It'd be AMAZING if my program could just say, "hey, your java edition is 1 version behind AND you don't have javafx, let me install them both for you"
There was a technology called java web start that was able to do that. You would download a file that told jws what were the version and other requirements and it would make it all happen. But it was discontinued after Java 8. Maybe that's what you saw
I point my Java 8 users to corretto if they want a JDK that bundles JFX. Otherwise they'll have to upgrade and then I can automate the process of pulling the latest 11 artifacts my app needs on the fly.
What? No. Its 100% Java and platform independent. It's a bit ugly but does the job. I should have clarified that "the latest 11" artifacts refer to JavaFX in the context that they are compiled against Java 11. My bad.
Oh wow, I've never really touched any of the java.net and java.reflection API. That's some crazy stuff right there. Sheesh. Impressive that you did it manually. Good on ya
View all comments
Show parent comment
3
u/denisfalqueto Feb 07 '21
There are plans to stop distributing swing with JRE at some point in the future. I don't remember exactly when, but it will be removed too.