JavaFX or Swing + jpackage + Maven template project for generating native desktop applications.

Overview

Java + Maven + GitHub Actions = Native Desktop Apps

JavaFX or Swing + jpackage + Maven template project for generating native desktop applications.

Goal

  1. Build nice, small cross-platform JavaFX or Swing desktop apps with native installers
    • Apx 30-40mb .dmg, .msi and .deb installers - check out the example builds in releases.
    • Note that the macOS builds are not signed, and therefore macOS will report as damaged/unopenable. There are a few ways to deal with this, depending on your situation.
  2. Just use Maven - no shell scripts required.
    • Use standard Maven dependency system to manage dependencies
  3. Generate macOS (.dmg), Windows (.msi) and Unix (e.g. deb/rpm) installers/packages automatically with GitHub Actions.

Overview

This template uses a Maven plugin to generate a custom JVM and installer package for a JavaFX application. It can easily be adapted to work with Swing instead.

Requirements

The project includes GitHub Actions which automatically generate macOS, Windows, and Linux installers.

The generated installers come in at around 30-40mb. The example source in the project includes demonstrations of several native desktop features - for example, drag-and-drop from the Finder/Explorer, as well as a few macOS Dock integration examples. Removing the code and the demonstration dependencies gets a "Hello World" build size closer to 30mb than 40mb.

Key Features

Here are few cool things in this template:

  • Only uses Java and Maven. No shell scripts required.
  • Includes sample GitHub Actions to build macOS, Windows and Linux installers
  • Demonstrates setting the application icon
  • Builds a .dmg on macOS, .msi on Windows, and .deb on Linux
  • Bundles the JavaFX SDK & modules to simplify getting started.
    • Just delete the JavaFX stuff if you are using Swing
  • Template includes several examples of JavaFX / native desktop integration
    • Drag & drop with Finder / Explorer
    • Change the Dock icon dynamically on macOS
    • Menu on the top for macOS, in the window itself on Windows
    • Request user attention (bouncing dock icon) on macOS
  • Java + Java modules are used to build a trimmed JVM (a few thoughts on Java modules)
  • The user application uses ordinary Maven dependencies and classpath to run the application
    • Nice illustration of how to use jlink to build a slim JVM, point jpackage at that JVM and still use the ordinary classpath for the application

Once you get started, you might find these lists of tutorials, tools, libraries for JavaFX and general Java desktop integration helpful.

Does this work with Apple Silicon aka M1?

Yes, although as of this writing I don't believe there are GitHub Action runners that support M1. But building locally on my M1 laptop works great and generates native M1 builds.

I downloaded the macOS release and it won't open - the Finder says it's damaged!

Yup, it's quarantined because it's not signed. You can override the quarantine via a command-line option. See the next Q on macOS signing, notarization, and stapling.

Does this support macOS signing, notarization, and stapling?

Yes, there is a GitHub Action and a Maven profile to assist with setting all of this up for macOS applications.

For more information, see the documentation on getting macOS signing/notarization/stapling set up. It won't work out of the box, as you need to sign up for an Apple Developer account, add a bunch of GitHub Secrets and update the pom.xml.

What about Linux?

The JavaFX builds include several other architectures, including aarch64 and arm32. In theory, you should be able to add those just like the other builds. Haven't tested it though. Feel free to post in the discussion section if you are using Linux.

Can I Use this with Swing instead of JavaFX?

tl;dr absolutely.

It's actually a lot easier to use Swing instead of JavaFX, as Swing is built in to the JDK and doesn't require fiddling with Java modules.

Just delete the JavaFX stuff, including the JavaFX modules and add a Swing main class instead. If you are reasonably familiar with Maven this shouldn't be very hard to do.

I highly recommend the FlatLaf as a must use with Swing. That look-and-feel plus designers such as the IntelliJ GUI Designer or JFormDesigner can work very well, arguably with an easier learning curve than JavaFX.

In particular, delete the following directories:

/javafx-linux-x64_64
/javafx-osx-x86_64
/javafx-os-aarch_64
/javafx-windows-x86_64

Changes to the pom.xml:

  1. Remove the javafx modules from the jvm.modules property
  2. Remove the javafx.version property.
  3. Remove the three org.openjfx dependencies
  4. Remove the configuration/excludeGroupIds section from the maven-dependency-plugin
  5. Remove javafx-maven-plugin from the plugins list
  6. Remove the modulePath delcaration from the jtoolprovider-plugin execution/configuration

Usage

Once everything is installed (see below) it's really easy to use:

To generate an installer, just run...

mvn clean install

To do everything up until the actual installer generation (including generating the custom JVM)...

mvn clean package

Installation

  1. Install OpenJDK Java 17 or Oracle Java 17.
    • Verify by opening a fresh Terminal/Command Prompt and typing java --version.
  2. Install Apache Maven 3.6.3 or later and make sure it's on your path.
    • Verify this by opening a fresh Terminal/Command Prompt and typing mvn --version.
  3. macOS: verify XCode is installed and needed agreements accepted.
    • Launch XCode and accept the license, or verify in Terminal with the command sudo xcodebuild -license.
  4. Windows: install Wix 3 binaries.
    • Installing Wix via the installer should be sufficient for jpackage to find it.
  5. Clone/download this project.
  6. Final step: run mvn clean install from the root of the project to generate the target\TestApp.dmg or target\TestApp.msi (installer).
    • Note that the actual generated installer will include a version number in the file name
    • For reference, here is a complete run log for a successful run.

Because these builds use stripped down JVM images, the generated installers are in the 30-40mb range.

On macOS you should add signing to avoid error messages related to the security system(s).

Debugging

  1. If the built app fails to run, make sure the JavaFX app runs as expected first by using the mvn javafx:run command. This will run the app in development mode locally, and you should see standard System.out debug lines appear in your console.
  2. Check the Maven build logs (of course).
  3. By default, the app will generate debug*****.log files containing the output from System.out. You can look at the main method of BaseApplication.java to see how this is done. For a production app, you would want to place these logs in the correct OS specific location. On a Unix machine you can tail -f the log normally.

OS-Specific Notes

Linux

There are a LOT of different flavors of Linux out there. I've provided the Ubuntu build more as an example of how the GitHub Action works, but I can't diagnose or trouble-shoot your Linux build (unless it's a consulting engagement). Feel free to post these in discussions!

I will note, however, that much of the Linux trouble I have seen comes from some of the included integration demonstrations. Try commenting out the loading of demo plugins in BaseApplication.java - specifically the loop that loads the plugins.

In theory, the Exception handler in the plugin loader code should catch the exceptions. In practice, on a few flavors of Linux something dies with a native exception that takes it all down.

I get more support/issues for Linux builds than anything else, often for distros I've never heard of... which is cool but not something I'm really set up to deal with (short of paid consulting). That said, every Linux support issue so far has been resolved pretty easily by folks posting Maven or application log files in the discussion group. No promises, but go forth and post!

Help

Problems? Make sure everything is installed and working right!

  • Compiler not recognizing the --release option? Probably on an old JDK.
  • Can't find jdeps? Probably on an old JDK.
  • Can't find jpackage on Java 15? Probably haven't set up your system to allow Java 15 to enable preview packages.
  • Unrecognized option: --add-modules jdk.incubator.jpackage
    • Could be a left-over MAVEN_OPTS setting when you switched from Java 15 to Java 16/17
    • If you are still on Java 15, you may not have MAVEN_OPTS set correctly.

If you need consulting support, feel free to reach out at ChangeNode.com.

Q&A

If you are using the template, browsing the Q&A is highly recommended.

Comments
  • Jdeps missing dependencies

    Jdeps missing dependencies

    Hello,

    I'm somewhat reluctant to ask because I have a hunch I'm overlooking something silly, but I feel I've checked everything I could think of a couple of times over. I must confess this is the first time I'm using Java modules, and I have a hunch there is something not quite right in that general direction. This is what I did so far:

    • set up the environment according to the readme.md;
    • created a new repo using your template;
    • cloned it locally, tried it out, got a TestApp.dmg, installed that and it works fine;
    • merged the code from my original application in that repository;
    • changed some settings, like adding the javafx-fxml and javafx-web modules (I should replace the -web one with something more light-weight, I only use it to render rich text);
    • added the required Spring boot, H2 and FXWeaver dependencies and the H2 db files ...

    and hit mvn clean install

    Result: git 2021-03-04 01-36-31 2

    There's a small .jar with only the classes from the src/directory, and one of around ~30Mb in the shaded-jar directory. The unpacked-shade dir looks as if it contains what I would expect (eg Spring, H2, Hibernate etc.). But it goes wrong in the jdeps step. The java-tool reports:

    Failed to execute goal io.github.wiverson:jtoolprovider-plugin:1.0.25:java-tool (jdeps) on project ithildin: jdeps 1 Details:

    [INFO] 
    [INFO] --- jtoolprovider-plugin:1.0.25:java-tool (jdeps) @ ithildin ---
    [ERROR] jdeps failed with error code [1]
    [ERROR]    --add-modules
    [ERROR]    javafx.base,javafx.controls,javafx.graphics,javafx.fxml,javafx.web,java.logging
    [ERROR]    --generate-module-info
    [ERROR]    /Users/luthien/git/aduial/ithildin-app/target/work
    [ERROR]    --module-path
    [ERROR]    /Users/luthien/git/aduial/ithildin-app/mac-javafx/javafx-sdk-15.0.1/lib/
    [ERROR]    /Users/luthien/git/aduial/ithildin-app/target/shaded-jar/ithildin.jar
    [INFO] Error: Missing dependencies: classes not found from the module path and classpath.
    To suppress this error, use --ignore-missing-deps to continue.
    ithildin
       ch.qos.logback.classic.ViewStatusMessagesServlet   -> javax.servlet.http.HttpServletRequest              not found
       ch.qos.logback.classic.ViewStatusMessagesServlet   -> javax.servlet.http.HttpServletResponse             not found
    ... (4500 more lines like this)
    

    It's a LONG list ;) - it looks like, well, as if I would generate the "Effective POM" in IntelliJ and then spell out every method included therein. Again, I have a hunch this is something really silly, but I can't find it ... 😓

    opened by Luthien-in-edhil 51
  • OpenJDK build Zulu-16.0.2 Native (Apple M1) Failure on App Launch

    OpenJDK build Zulu-16.0.2 Native (Apple M1) Failure on App Launch

    Wonder project!

    I tried it on my Windows 10 box and it worked great.

    I tried it on my M1 Mac Mini and it compiled without errors. It created the macOS bundle. I opened the bundle and dragged the icon to the applications folder and that worked fine. When I tried to open the application it opened but the only thing that happened was the icon appeared on the doc. No window popped up as in windows. Below is the output from "mvn clean install"

    [INFO] Scanning for projects... [INFO] [INFO] ---------------< com.changenode:maven-jpackage-template >--------------- [INFO] Building maven-jpackage-template 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-jpackage-template --- [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ maven-jpackage-template --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 4 resources to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/packaging [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ maven-jpackage-template --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 9 source files to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ maven-jpackage-template --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ maven-jpackage-template --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ maven-jpackage-template --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ maven-jpackage-template --- [INFO] Building jar: /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/maven-jpackage-template-1.0-SNAPSHOT.jar [INFO] [INFO] --- maven-dependency-plugin:3.1.2:copy-dependencies (copy-dependencies) @ maven-jpackage-template --- [INFO] Copying javafaker-1.0.2.jar to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/javafaker-1.0.2.jar [INFO] Copying commons-lang3-3.5.jar to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/commons-lang3-3.5.jar [INFO] Copying snakeyaml-1.23-android.jar to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/snakeyaml-1.23-android.jar [INFO] Copying generex-1.0.2.jar to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/generex-1.0.2.jar [INFO] Copying automaton-1.11-8.jar to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/automaton-1.11-8.jar [INFO] [INFO] --- jtoolprovider-plugin:1.0.34:java-tool (jlink) @ maven-jpackage-template --- [INFO] [INFO] --- maven-install-plugin:3.0.0-M1:install (default-install) @ maven-jpackage-template --- [INFO] Skipping artifact installation [INFO] [INFO] --- jtoolprovider-plugin:1.0.34:java-tool (jpackage) @ maven-jpackage-template --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 26.680 s [INFO] Finished at: 2021-08-06T22:17:15-04:00 [INFO] ------------------------------------------------------------------------ parrishcameron@Parrishs-Mac-mini maven-jpackage-template-main % clear

    parrishcameron@Parrishs-Mac-mini maven-jpackage-template-main % mvn clean install [INFO] Scanning for projects... [INFO] [INFO] ---------------< com.changenode:maven-jpackage-template >--------------- [INFO] Building maven-jpackage-template 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ maven-jpackage-template --- [INFO] Deleting /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ maven-jpackage-template --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 4 resources to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/packaging [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ maven-jpackage-template --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 9 source files to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ maven-jpackage-template --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ maven-jpackage-template --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ maven-jpackage-template --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ maven-jpackage-template --- [INFO] Building jar: /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/maven-jpackage-template-1.0-SNAPSHOT.jar [INFO] [INFO] --- maven-dependency-plugin:3.1.2:copy-dependencies (copy-dependencies) @ maven-jpackage-template --- [INFO] Copying javafaker-1.0.2.jar to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/javafaker-1.0.2.jar [INFO] Copying commons-lang3-3.5.jar to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/commons-lang3-3.5.jar [INFO] Copying snakeyaml-1.23-android.jar to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/snakeyaml-1.23-android.jar [INFO] Copying generex-1.0.2.jar to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/generex-1.0.2.jar [INFO] Copying automaton-1.11-8.jar to /Users/parrishcameron/eclipse-workspace/maven-jpackage-template-main/target/dependency/automaton-1.11-8.jar [INFO] [INFO] --- jtoolprovider-plugin:1.0.34:java-tool (jlink) @ maven-jpackage-template --- [INFO] [INFO] --- maven-install-plugin:3.0.0-M1:install (default-install) @ maven-jpackage-template --- [INFO] Skipping artifact installation [INFO] [INFO] --- jtoolprovider-plugin:1.0.34:java-tool (jpackage) @ maven-jpackage-template --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 18.684 s [INFO] Finished at: 2021-08-06T22:24:42-04:00 [INFO] ------------------------------------------------------------------------

    opened by PerryCameron 10
  • Error creating windows installer with jPackage

    Error creating windows installer with jPackage

    On running mvn clean install the build works then hits an error when running the jpackage-win-installer phase. The error it gives out is yielded below:

    Bundler EXE Installer Package skipped because of a configuration problem: java.lang.module.FindException: Error reading module: C:\Users\shadrach PC\Documents\programming projects \Maven\clip_share\target\modules\clipShare.jar

    Failed to execute goal io.github.wiverson:jtoolprovider-plugin:1.0.23:java-tool (jpackage-win-installer) on project clipShare: jpackage 1 -> [Help 1]

    Is there anything cause for this ?

    opened by o4codes 8
  • Spring Boot + JPA integration

    Spring Boot + JPA integration

    I am having problems impleting spring boot + jpa into your maven-jpackage template.

    I saw there was a branch which is missing https://github.com/wiverson/maven-jpackage-template/tree/spring-boot-test is there a way to still check it out

    I managed to implemenet spring boot without jpa as seen here but when trying to implement jpa with sql lite I am getting problems in production build for example.

    Log :: Spring Boot :: (v2.7.4)
    2022-09-24 10:07:54.292  INFO ??? --- [JavaFX-Launcher] o.s.boot.SpringApplication               : Starting application using Java 17.0.4 on windows with PID ??? (started by don in C:\WINDOWS\system32)
    2022-09-24 10:07:54.295  INFO ??? --- [JavaFX-Launcher] o.s.boot.SpringApplication               : No active profile set, falling back to 1 default profile: "default"
    2022-09-24 10:07:54.590 ERROR ??? --- [JavaFX-Launcher] o.s.boot.SpringApplication               : Application run failed
    
    java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer
        at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4]
        at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:193) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:153) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:129) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:343) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.4.jar:2.7.4]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.4.jar:2.7.4]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.4.jar:2.7.4]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.4.jar:2.7.4]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.4.jar:2.7.4]
        at com.javafxspring.BaseApplication.init(BaseApplication.java:47) ~[javafx-spring-1.0-SNAPSHOT.jar:na]
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source) ~[javafx.graphics:na]
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source) ~[javafx.graphics:na]
        at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
    Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.javafxspring.config.DbConfig] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@e3269ba]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485) ~[spring-core-5.3.23.jar:5.3.23]
        at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:361) ~[spring-core-5.3.23.jar:5.3.23]
        at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:418) ~[spring-core-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$2(AbstractAutowireCapableBeanFactory.java:765) ~[spring-beans-5.3.23.jar:5.3.23]
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Unknown Source) ~[na:na]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:764) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:703) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:674) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1670) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:570) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:542) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:250) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4]
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:243) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4]
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:233) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4]
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:181) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4]
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:156) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4]
        at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.7.4.jar:2.7.4]
        ... 19 common frames omitted
    Caused by: java.lang.NoClassDefFoundError: javax/sql/DataSource
        at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
        at java.base/java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[na:na]
        at java.base/java.lang.Class.getDeclaredMethods(Unknown Source) ~[na:na]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467) ~[spring-core-5.3.23.jar:5.3.23]
        ... 35 common frames omitted
    Caused by: java.lang.ClassNotFoundException: javax.sql.DataSource
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) ~[na:na]
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source) ~[na:na]
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na]
        ... 39 common frames omitted
    
    2022-09-24 10:07:54.598  WARN ??? --- [JavaFX-Launcher] o.s.boot.SpringApplication               : Unable to close ApplicationContext
    
    java.lang.IllegalStateException: Failed to introspect Class [com.javafxspring.config.DbConfig] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@e3269ba]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485) ~[spring-core-5.3.23.jar:5.3.23]
        at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:361) ~[spring-core-5.3.23.jar:5.3.23]
        at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:418) ~[spring-core-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$2(AbstractAutowireCapableBeanFactory.java:765) ~[spring-beans-5.3.23.jar:5.3.23]
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Unknown Source) ~[na:na]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:764) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:703) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:674) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1670) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:570) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:542) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:669) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:661) ~[spring-beans-5.3.23.jar:5.3.23]
        at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1300) ~[spring-context-5.3.23.jar:5.3.23]
        at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:867) ~[spring-boot-2.7.4.jar:2.7.4]
        at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:855) ~[spring-boot-2.7.4.jar:2.7.4]
        at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:842) ~[spring-boot-2.7.4.jar:2.7.4]
        at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:782) ~[spring-boot-2.7.4.jar:2.7.4]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-2.7.4.jar:2.7.4]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.4.jar:2.7.4]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.4.jar:2.7.4]
        at com.javafxspring.BaseApplication.init(BaseApplication.java:47) ~[javafx-spring-1.0-SNAPSHOT.jar:na]
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source) ~[javafx.graphics:na]
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source) ~[javafx.graphics:na]
        at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
    Caused by: java.lang.NoClassDefFoundError: javax/sql/DataSource
        at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
        at java.base/java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[na:na]
        at java.base/java.lang.Class.getDeclaredMethods(Unknown Source) ~[na:na]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467) ~[spring-core-5.3.23.jar:5.3.23]
        ... 24 common frames omitted
    Caused by: java.lang.ClassNotFoundException: javax.sql.DataSource
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) ~[na:na]
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source) ~[na:na]
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na]
        ... 28 common frames omitted
    
    Exception in Application init method
    java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
    Caused by: java.lang.RuntimeException: Exception in Application init method
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer
        at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60)
        at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108)
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:193)
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:153)
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:129)
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:343)
        at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
        at com.javafxspring.BaseApplication.init(BaseApplication.java:47)
        ... 3 more
    Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.javafxspring.config.DbConfig] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@e3269ba]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485)
        at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:361)
        at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:418)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$2(AbstractAutowireCapableBeanFactory.java:765)
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Unknown Source)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:764)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:703)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:674)
        at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1670)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:570)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:542)
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:250)
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:243)
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:233)
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:181)
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:156)
        at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)
        ... 19 more
    Caused by: java.lang.NoClassDefFoundError: javax/sql/DataSource
        at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.base/java.lang.Class.getDeclaredMethods(Unknown Source)
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467)
        ... 35 more
    Caused by: java.lang.ClassNotFoundException: javax.sql.DataSource
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        ... 39 more
    Exception running application com.javafxspring.BaseApplication
    ```
    
    opened by Don-Cryptus 4
  • GitHub Actions build for mac builds damaged app

    GitHub Actions build for mac builds damaged app

    It seems that the build action on GitHub builds an app that cannot be double clicked on to run. I get the popup error “TestApp” is damaged and can’t be opened. You should move it to the Bin. However when I run it from the terminal, it runs OK

    ./TestApp.app/Contents/MacOS/TestApp
    

    I initially thought it was a permissions issue, as GitHub actions has a 'bug' where artifacts lose their permissions but the above file seems ok -rwxr-xr-x 1 andy 150864 Dec 17 10:35 ./TestApp.app/Contents/MacOS/TestApp.

    bug documentation enhancement 
    opened by abulka 4
  • Fix for finding file identifier in add-launch-to-msi.js

    Fix for finding file identifier in add-launch-to-msi.js

    jpackage created an MSI with a LongFileName|ShortFileName format which caused the lookup to fail. I ended up using the FindFileIdentifier function in this post to resolve the identifier:

    https://stackoverflow.com/a/1681410

    You may want to consider enhancing your script to account for these differences if you stumble upon the same issue.

    bug 
    opened by mcantrell 4
  • Debugging a failing startup app / including FXML files

    Debugging a failing startup app / including FXML files

    First, thanks a lot for this repo. It's very useful.

    I have this template with Spring Boot included. When I generate the installer, it's not starting (and it doesn't produce any error). Once we have the jlink-ed runtime image, is there any way we can run our jar on this image to see what outputs produce?

    On another note, I have the views in FMXL, and they are in src/main/resources/views. Do you have any experience bundling these views within the resulting artefacts?

    Thanks a lot.

    opened by antmordel 4
  • MAVEN_OPTS=

    MAVEN_OPTS="--add-modules jdk.incubator.jpackage" not working on windows

    adding MAVEN_OPTS="--add-modules jdk.incubator.jpackage" to env on windows does not yield appropriate results when mvn --version is ran. this is what it produces as output on windows:

    Unrecognized option: --add-modules jdk.incubator.jpackage Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

    How can this be solved ?

    opened by o4codes 4
  • Could this work together with Spring Boot?

    Could this work together with Spring Boot?

    Hi,

    this template looks very promising. I'm eager to try out and see if it works for my project. It is a JavaFX desktop app that uses Spring Boot, JPA and a H2 database. I used FXWeaver to make Spring and JavaFX play nice together, and that seems to work perfectly OK, but I am still trying to settle on a way to build packages for Windows, Mac OS and Linux.

    I've worked long enough with Spring (+Boot) to always be a bit suspicious when it comes to any novel use-case ... Spring's invisible magic is great as long as it works for you, but it can also make it extremely hard to figure out when there's an issue.

    That's why I wonder if you might already have used them together, or know of another project that did? All the best, LĂșthien

    opened by Luthien-in-edhil 3
  • Odd Installer Behaviour

    Odd Installer Behaviour

    I have two projects with this template. When I run the installer created with one, it removes the installation files of the other during install.

    run ProjectA.msi -> see that it is installed under C:\Program Files\ProjectA run ProjectB.msi -> see that it is installed under C:\Program Files\ProjectB also see that files under C:\Program Files\ProjectA are gone.

    And this is both ways. ProjectA installer uninstalls ProjectB and vice versa.

    opened by hrzafer 2
  • [bug] when launching app on Windows app is launch in background

    [bug] when launching app on Windows app is launch in background

    That's not a big issue but you can probably fix it easily. If app is launch by the .msi installer it is launch under the explorer. (I don't see the window the 1st time I try the app because my explorer was in full screen).

    A fix in Java Swing will be to add

    super.setAlwaysOnTop(true);
    super.toFront();
    super.requestFocus();
    super.setAlwaysOnTop(false);
    

    at the end of the window constructor.

    Capture d’écran (1258)

    enhancement good first issue 
    opened by HydrolienF 2
  • MSI update don't work

    MSI update don't work

    New msi with bump app.version with same UUID in pom.xml doesn't upgrade previous, it's install like new. Look like bad wix configuration. For test propose add to windows-jpackage.txt argument: "--win-dir-chooser"

    Links for research:

    1. https://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html
    2. https://blog.codeinside.eu/2012/12/13/windows-installer-xml-wix-and-version-numbers-what-is-important-and-what-isnt/
    3. https://docs.oracle.com/en/java/javase/17/jpackage/override-jpackage-resources.html#GUID-62412365-821D-4736-A20D-70F2D47136D8
    4. https://stackoverflow.com/questions/67159129/how-to-override-javas-jpackage-wix-defaults-to-create-an-environment-variable-c
    5. https://stackoverflow.com/questions/10517066/wix-how-to-override-upgradecode-when-installing-an-msi-file
    opened by ddark008 1
  • Incorporate Linux/misc fixes from freixas/gamma

    Incorporate Linux/misc fixes from freixas/gamma

    I finally managed to create a release with Windows and Linux (no Mac yet).

    My first attempt tried to use your maven-build-installer-unix.yml. It failed with an obscure error. It turned out to be a typo in my linux-jpackage.txt file, but it quickly became evident that using a runner to debug the build process wasn't going to fly.

    I wound up eventually building in on Ubuntu running on VirtualBox.

    It's good I did. Java's motto was "write once, run anywhere". Nope. I have a few important platform dependencies that caused the Linux version to fail. One of them was in the Desktop class you had mentioned. Even after checking that Desktop is supported and that the BROWSE action is supported, Desktop.getDesktop().browse() causes Linux programs to hang.

    I also made a few changes to my linux-jpackage.txt based on the things I learned by actually installing the application.

    The moral of the story is that you can't really expect to release anything on a platform where the software and the installation are not tested. But if I have access to all the platforms I support, then I don't need GitHub runners. They might be convenient for simple programs or if changes are deemed unlikely to have platform dependencies (you're always taking a chance).

    If I don't build and test on a Mac, it's unlikely my software will work, so I'm not sure what I'll do. I do provide a "universal" tar.gz file, but that won't resolve platform problems.

    I didn't want to have builds automatically triggered by push/pull requests and I only wanted one release with all the different installers as assets. I'm not using the actions, but I did make them all so they were manually triggered (it seems you might have done the same recently). If I ever go down that route, I'll probably build using actions, download and test the resulting installers and then manually attach them to a release.

    While the GitHub actions haven't yet proved useful, all your work with the maven/jpackage integration certainly has.

    If you have any interest in the changes I've made in the pom.xml or the packaging files, everything has been uploaded to my GitHub project, https://github.com/freixas/gamma.

    Originally posted by @freixas in https://github.com/wiverson/maven-jpackage-template/discussions/60#discussioncomment-2359987

    opened by wiverson 0
  • GitHub Actions build for linux - can install but not run

    GitHub Actions build for linux - can install but not run

    I tried installing the .deb built by the linux build action on my Ubuntu 18.04. Double clicking on the file https://github.com/wiverson/maven-jpackage-template/releases/download/Ubuntu-latest/testapp_21.40.052006-1_amd64.deb installs it ok, but finding it via the Desktop search and then running it did nothing. So I ran it from the terminal:

    $ dpkg -L testapp | grep bin
    /opt/testapp/bin
    /opt/testapp/bin/TestApp
    
    andy@ubuntu-amd:~$ /opt/testapp/bin/TestApp
    
    (TestApp:8329): Gdk-WARNING **: 10:55:57.048: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.
    

    Update:

    I uninstalled it and installed it again using the command line - only to see a broken repository error being reported?

    $ sudo apt install /home/andy/Downloads/testapp_21.40.052006-1_amd64.deb
    Reading package lists... Done
    ...
    Setting up testapp (21.40.052006-1) ...
    W: Repository is broken: testapp:amd64 (= 21.40.052006-1) has no Size information
    

    Despite the error, the TestApp seems to be installed ok, but with the same GDK error trap error when attempting to run it.

    opened by abulka 3
  • Unable to start the software by double clicking the icon

    Unable to start the software by double clicking the icon

    1. @wiverson I have downloaded the Source code(tar.gz) in my Ubuntu 20.04 machine with JDK 16 and Maven 3.8.1, and run mvn clean install and successfully generated the testapp_21.32.012058-1_amd64.deb. Installed it successfully. But while double clicking on the icon nothing happens. Hence I have downloaded the .deb file from github, installed and tried to run and again nothing happens. Then stripped out the maven-jpackage-template-1.0-SNAPSHOT.jar from .deb file and run in terminal and got stack traceno main manifest attribute, in maven-jpackage-template-1.0-SNAPSHOT.jar
    2. I have made a demo modular project (consisting a blank stage only) and run mvn clean install .Everything is OK and fine up to [INFO] --- jtoolprovider-plugin:1.0.34:java-tool (jlink) @ maven-jpackage-template --- in the run log. After that get the following error [ERROR] jlink failed with error code [1] [ERROR] --add-modules [ERROR] javafx-controls,javafx.fxml,java.logging [ERROR] --module-path [ERROR] /home/user/eclipse-workspace/Demo/linux-javafx/javafx-jmods-16/ [ERROR] --output [ERROR] /home/user/eclipse-workspace/Demo/target/jvm-image [ERROR] --strip-native-commands [ERROR] --no-header-files [ERROR] --strip-debug [ERROR] --no-man-pages [ERROR] --compress=2 [INFO] Error: Module javafx.fxml not found java.lang.module.FindException: Module javafx.fxml not found at java.base/java.lang.module.Resolver.findFail(Resolver.java:900) at java.base/java.lang.module.Resolver.resolve(Resolver.java:128) at java.base/java.lang.module.Configuration.resolve(Configuration.java:421) at java.base/java.lang.module.Configuration.resolve(Configuration.java:255) at jdk.jlink/jdk.tools.jlink.internal.Jlink$JlinkConfiguration.resolve(Jlink.java:217) at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImageProvider(JlinkTask.java:489) at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:399) at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:271) at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:54) at jdk.jlink/jdk.tools.jlink.internal.Main$JlinkToolProvider.run(Main.java:65) at java.base/java.util.spi.ToolProvider.run(ToolProvider.java:138) at io.github.wiverson.RunTool.runTool(RunTool.java:109) at io.github.wiverson.ToolProviderAdapterHints.execute(ToolProviderAdapterHints.java:276) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.838 s [INFO] Finished at: 2021-08-12T21:47:05+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.github.wiverson:jtoolprovider-plugin:1.0.34:java-tool (jlink) on project Demo: jlink 1 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

    Please help me to make the installer successfully

    bug has workaround 
    opened by renojjoseph 4
  • Build Numbers and Windows Product Versions

    Build Numbers and Windows Product Versions

    Hi,

    on Windows using <maven.build.timestamp.format>yy.w.ukkmm</maven.build.timestamp.format> can lead to a timestamp 21.29.71010, (2021, week 29, Sunday, 10:00 AM) which violates the specification in https://docs.microsoft.com/en-us/windows/win32/msi/productversion, that requires a product version of not greater than maximum value of 65,535. ... hence the build fails.

    (general: fantastic work --> thanks so much!!) Peter

    bug good first issue has workaround 
    opened by taunuscoder 5
Releases(windows-latest)
Owner
Will Iverson
Consulting from 2000-2016, including co-founding Dev9 (Java, CI/CD, 2010-2016). Video games (Unity, 2017-2020). Back to Java in 2021.
Will Iverson
The shortest possible maven template / quickstarter for Java 16

The shortest possible Java 16 maven quickstarter The shortest possible Apache Maven template for Java 16 usage git clone https://github.com/AdamBien/j

Adam Bien 6 Nov 8, 2021
A Spigot latest maven starter template.

NAME One sentence to describe your plugin. Introduction Describe your plugin clearly. Features Feature 1 Dependencies Commands /command Command functi

Katorly Lab 3 Jul 1, 2022
Template to speed up your development in React Native projects.

React Native SpaceShip I created this template with the purpose of leaving the development environment already configured for use. ?? How to use it in

Lucas Augusto 3 Mar 23, 2022
A React Native Template for installing a working ClojureScript, Krell, and Storybook environment

A React Native Template for ClojureScript, Krell, and Storybook Getting Started npx react-native init YourProjectName --template react-native-template

Joshua Miller 30 Dec 23, 2022
A tool generating local images based on ECharts-Java

Test plan Local unit testing Docker AWS remote Linux Windows MacOS Integration Test with Snapshot version Introduction This library is used to take sn

ECharts Java Open Source Project 5 Dec 16, 2022
This is simple project to show how to create a basic API using Java 11 + Maven + Spring Boot + PostgrSQL + Flyway.

This is simple project to show how to create a basic API using Java 11 + Maven + Spring Boot + PostgrSQL + Flyway.

Sean Maxwell 11 Dec 10, 2022
Spring-boot project using open-api, docker, maven, REST

library-service spring-boot project using open-api, docker, maven, REST I used docker to run the project, as well as open-api to generate basic GET an

Sandy Huang 2 Nov 27, 2022
Sceneform React Native AR Component using ARCore and Google Filament as 3D engine. This the Sceneform Maintained Component for React Native

Discord Server Join us on Discord if you need a hand or just want to talk about Sceneform and AR. Features Remote and local assets Augmented Faces Clo

SceneView Open Community 42 Dec 17, 2022
React native wrapper for Jitsi Meet SDK Library that rely on the native view (Activity / ViewController)

react-native-jitsi-meet-sdk React native wrapper for Jitsi Meet SDK Library. This Library implements the Jitsi SDK with a native activity on the Andro

null 7 May 2, 2022
With react-native-update-in-app library you can easily implement in-app updates in your React Native app using CDN or any other file server

React Native In-App update With react-native-update-in-app library you can easily implement in-app updates in your React Native app using CDN or any o

Nepein Andrey 7 Dec 21, 2022
An awesome native wheel picker component for React Native.

⛏ react-native-picky An awesome native wheel picker component for react-native. Features Supports multiple columns ✅ Supports looping ✅ Native Androi

null 28 Dec 4, 2022
Cloud Native and Low Code Platform to create FullStack web Admin applications in minutes

Cloud Native and Low Code Platform to create FullStack web Admin applications in minutes ✹ Features & Technologies REST API generator Low Code CRUD &

Gemini Framework 171 Dec 26, 2022
A Java-based template project for the FastJ Game Engine.

FastJ Java Template Program Requirements Java 16 JDK Basic understanding of Java Initial Setup Download the Template You have a few options for gettin

Andrew Dey 13 May 15, 2022
A boilerplate project designed to work as a template for new microservices and help you get in touch with various useful concepts.

Microservice Reference Project This project is inspired by the idea to quickly create a production ready project with all the required infrastructure

Innovation & Tech 4 Dec 17, 2022
This project archetype is a template for creating a fully functional MVC web application using Hibernate, JSTL and Bootstrap

This project archetype is a template for creating a fully functional MVC web application using Hibernate, JSTL and Bootstrap. It has an automatic database creation, auto initial load of the data, with different variety of users. It also has a checkstyle to check the proper coding of your project immediately right after you enter the code.

null 90 Oct 21, 2022
A template for a Forge + Fabric project setup using a Common source set.

MultiLoader Template This project provides a Gradle project template that can compile mods for both Forge and Fabric using a common sourceset. This pr

Jared 130 Jan 5, 2023
An assistance platform made using Spring framework that analyses your code, and helps you either to start a devops project, or to turn an existing project into a devops project using open source software (Git, Docker, Jenkins..)

DevOpsify Description An assistance platform made using Spring framework that analyses your code, and helps you either to start a devops project, or t

obaydah bouifadene 14 Nov 8, 2022
Aliucord - Discord Android app mod inspired by desktop Discord client mods.

Aliucord Aliucord is a modification for the Android Discord app inspired by desktop client modifications. Unlike other Android Discord app modificatio

null 2k Dec 31, 2022
The Download Manager uses a simple yet effective GUI interface built with java’s Swing libraries

The Download Manager uses a simple yet effective GUI interface built with java’s Swing libraries.The use of Swing gives the interface a crisp, modern look and feel. The GUI maintains a list of downloads that are currently being managed.

Manish Kumar Mahawar 2 Jan 2, 2022