How to deploy a JavaFX project with Maven to an EXE? - java

I hope this question does not seem to basic but I could not find any good documentation despite researching for hours.
I use Maven (Version 3.3.9) for my JavaFX (Version 11.0.2) with JDK 13.0.1 project and want to build an EXE.
What is the easiest way to do this?
All my researchs stucked somewhere.
Following this documentation, I tried to integrate ant-tasks. But the documentation required ant-javafx.jar to be in the jdk_home/lib directory which doesn't make sense for JDK 13 since it doesn't come with JavaFX.
But this was the latest official documentation where I could find something about Ant Task. So I guessed Ant Task does not work for JDK13 anymore, am I wrong? I hope this does not seem like a dumb assumption but I could not find a newer documentation.
I have also tried the zenjava plugin but the latest commit is 2 years ago, and when I try to use it I get an error
Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jdk-13.0.1/../lib/ant-javafx.jar
Since I've read that javafx-packager was renamed to java-packager a longer time ago (sorry, don't remember, where I've read this) I assumed that zenjava is not up to date for JDK 13.
I couldn't find anything else.
Thank you :)

The first thing to do is to upgrade your Java and JavaFX versions to 14. Then you can use the new jpackage tool, which does exactly what you need. How to do all this with Maven is described in this tutorial, which I did together with Dirk Lemmermann. Maybe that helps.
JPackageScriptFX

Related

JaCaMo cannot satisfy dependencies in Eclipse. Missing requirement

I am trying to follow the JaCaMo Eclipse Plugin instructions. I am getting a problem when installing a new software. Can anyone help? enter image description here
I tried to follow instructions but cannot solve the issue above. I have looked but cannot see anyone having the same problem.
I had the same issue. The problem is with the version of Eclipse. I'm assuming you're using a version that's 2021-12 or later. After the whole fiasco with Log4j at the end of 2021, I believe they stopped using it or changed something about it in Eclipse, and hence the error. Using Eclipse with versions 2021-09 or before will solve the issue.

Plugin for Java 15 support in eclipse 2020-09 no longer available

This question is similar to this one. I know you need to have this plugin to support Java 15 in eclipse 2020-09, however, it doesn't seem to be available any longer.
When I try to install it via the marketplace, I am getting this error:
No repository found at
https://download.eclipse.org/eclipse/updates/4.17-P-builds/.
Is there a way to install it from other sources?
I know that eclipse 2020-12 has been released, but we cannot use it due to bug #569498 (which didn't happen in eclipse 2020-09). So we would really need a way to install Java 15 support in eclipse 2020-09.
Because of regressions in 4.18, I decided to recreate 4.17-P-builds repository.
Please note this will be available till 4.19 is released or we decide to create a patch for 4.18 release.
I got a answer from the eclipse forums
Java 15 support is included in eclipse 4.18(2020-12). As part of
cleaning old releases we removed 4.17-P-builds repo as it is not
supported anymore.
Please upgrade to 2020-12 to continue work on java 15

Upgrading Gradle

I am fully aware that there are pages on the Gradle website that say how to upgrade, but only from 4.x and up.
I am trying to follow a tutorial in making a simple 'my first' Minecraft mod. In it, you are told to install forge 1.7.10, which, from what I understand runs on Gradle 2.0.
In order for me to continue with the tutorial, after some digging, it appears that Gradle 2.0 is not compatible with JDK 12.0.2, but I'm not entirely sure how to solve this.
any help is much 'preciated.
extending the answer from Chriki, you can change the gradle version in $projectroot/gradle/wrapper/gradle-wrapper.properties
here you can change the path to point to already downloaded gradle-bin,
something like this (distributionUrl=../../../build/tools/gradle-4.10.3-bin.zip)
or directly to gradle repository
(e.g. distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip)
I’m afraid, you have a chicken and egg problem here: your JDK 12 requires a recent Gradle version (at least 5.4, if I’m not mistaken). At the same time, the forge plugin that is used in your build doesn’t support Gradle 5, yet.
Maybe you can install and use JDK 11 instead? In that case you could work with Gradle 4 with which the forge plugin also seems to work. With my JDK 11 installation I could get the build to work as follows:
sed -i 's/gradle-2.0/gradle-4.10.3/' gradle/wrapper/gradle-wrapper.properties
This changes the Gradle wrapper version to 4.10.3 in gradle/wrapper/gradle-wrapper.properties (can also be done manually with a text editor). When I now run
./gradlew project
the build seems to generally work fine. It only complains: “You must set the Minecraft Version!” That’s a different matter, though.
For anyone here from Google, Minecraft Forge versions below 1.12 DO NOT SUPPORT any java version besides JDK8. You need to install JDK8.
The maximum version you can update your Gradle to is therefore 4.8.1, as any versions above that require JDK9.

Is the Google Eclipse Plugin for Juno (Eclipse 4.2) broken?

I just installed Eclipse EE Juno (4.2) and a whole slew of plugins for it. I am now attempting to install the Google plugin (GAE and GWT) and am getting an error when adding the update site through Juno's Install new software window:
Name: Google-Plugin
Location: http://dl.google.com/eclipse/plugin/4.2
When I try to enter this I get:
Could not find http://dl.google.com/eclipse/plugin/4.2
I see this question from a few months ago. Although I am having a very similar problem, I think I have a different problem altogether.
When I change the Location to http://dl.google.com/eclipse/plugin/3.7, I get the same error (except with 3.7 appended on the end of the error message instead of 4.2). I definitely have Internet access (how else would I be posting this question?!) so that's not the issue. If this was only working for the 4.2 plugin, I would happily try the "workaround" mentioned in the other post, or even step back down to Eclipse 3.7 (I have to have this plugin!) until 4.2 was working. But the fact that it's not even working for 3.7 tells me that something else is awrye here. Thanks in advance!
Edit:
Just to mess around with things, I have downloaded Indigo (3.7) and immediately attempted to install the Google-Eclipse plugin. I entered the following for my update site:
http://dl.google.com/eclipse/plugin/3.7
And received a nasty error:
Artifact not found: http://dl.google.com/eclipse/plugin/3.7/compositeContent.xml.
Artifact not found: http://dl.google.com/eclipse/plugin/3.7/compositeContent.xml.
http://dl.google.com/eclipse/plugin/3.7/compositeContent.xml
Am I going crazy here?!?! I've installed my fair share of Eclipse plugins and never had this much trouble. Especially from Google. And I know its not my Internet connection or my Eclipse instance because before I attempted to install the Google plugin, I installed Subversive, IvyDE and EclEmma...
It was also broken for me a little while ago, but seems to be working now. Maybe the site was down for a bit?
You can try installing the plugin from archive as described in the link:
https://developers.google.com/eclipse/docs/install-from-zip
Basically what you are doing is, you download the plugin as a zip(archive) and browse this archive instead of update site, during the plugin installation.

Where to obtain the apache JavaHL subversion binding library? [duplicate]

This question already has an answer here:
Paired JAR and native library binaries for SVN Java bindings (JavaHL) on Windows?
(1 answer)
Closed 8 years ago.
I can find the API-docs for JavaHL 1.6 at http://subversion.apache.org/docs/javahl/1.6/ . However I can't find any pointer to a jar+native binary (win32) package, or maven resource. Where do you obtain these artifacts?
There seems no obvious way to retrieve them directly (searched in some Maven repos). JavaHL (win32) is part every current eclipse version with subversive in it. So technically, the following would work:
Install in a fresh Eclipse installation the plugin Subversive.
Include there the (optional) library JavaHL.
At the end, you will find the library files in the directory plugins/org.polarion.eclipse.team.svn.connector.javahl16.win32_<version-nr>
Perhaps this workaround helps you, but I am interested in the "real" solution as well.
You can use the WANDisco SVN client installation, which installs the native libraries and 'paired' JAR file. See the accepted answer to my question here, which I'm going to suggest this as a duplicate of. (Although this question is older, I think the answer to the later one is more correct, so I see it as better that this is a duplicate of that if it makes any difference!)

Categories

Resources