1

I'm trying to use mvn clean javafx:jlink but I get an error. At first I noticed Error: Module jdk.jsobject not found but when using mvn -X clean javafx:jlink I saw that jlink.exe from Android Studio\jre\bin\jlink.exe was being used.

Could this be the problem? But I don't know how to fix it. Please help.

Create a project according to the instructions JavaFX and Eclipse modular with Maven : https://openjfx.io/openjfx-docs/#IDE-Eclipse: https://openjfx.io/openjfx-docs/#IDE-Eclipse

For creating runtime image using the instructions: https://openjfx.io/openjfx-docs/#modular

pom.xml

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>ru</groupId>
    <artifactId>iptvportal</artifactId>
    <version>0.0.1</version>
    <packaging>jar</packaging>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <javafx.version>18.0.1</javafx.version>
        <vlcj.version>4.7.1</vlcj.version>
        <vlcj-javafx.version>1.0.2</vlcj-javafx.version>
        <maven-compiler.version>3.8.1</maven-compiler.version>
        <maven-compiler.release>11</maven-compiler.release>
        <javafx-maven-plugin.version>0.0.8</javafx-maven-plugin.version>
    </properties> 
    
    <organization>
        <name>IPTVPORTAL</name>
    </organization>
    
    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-web</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>uk.co.caprica</groupId>
            <artifactId>vlcj</artifactId>
            <version>${vlcj.version}</version>
        </dependency>
        <dependency>
            <groupId>uk.co.caprica</groupId>
            <artifactId>vlcj-javafx</artifactId>
            <version>${vlcj-javafx.version}</version>
        </dependency>
    </dependencies>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler.version}</version>
                <configuration>
                    <release>${maven-compiler.release}</release>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>${javafx-maven-plugin.version}</version>
                <configuration>
                    <!--<executable>C:/Users/User/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.3.v20220515-1416/jre/bin/java</executable>-->
                    <stripDebug>true</stripDebug>
                    <compress>2</compress>
                    <noHeaderFiles>true</noHeaderFiles>
                    <noManPages>true</noManPages>
                    <launcher>iptvportal_launcher</launcher>
                    <jlinkImageName>iptvportal_image</jlinkImageName>
                    <jlinkZipName>iptvportal_zip</jlinkZipName>
                    <mainClass>ru.iptvportal.App</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

module-info.java

module iptvportal {
    exports ru.iptvportal;

    requires javafx.base;
    requires javafx.controls;
    requires javafx.graphics;
    requires javafx.web;
    requires jdk.jsobject;
    requires uk.co.caprica.vlcj;
    requires uk.co.caprica.vlcj.javafx;
}

mvn -X clear javafx:jlink logs: dropfiles with logs.txt

Error:

[DEBUG] Executing command line: [E:\Programming\Android Studio\jre\bin\jlink.exe, --module-path, E:\Programming\Eclipse\workspace\iptvportal\target\classes;C:\Users\User\.m2\repository\org\openjfx\javafx-base\18.0.1\javafx-base-18.0.1-win.jar;C:\Users\User\.m2\repository\org\openjfx\javafx-controls\18.0.1\javafx-controls-18.0.1-win.jar;C:\Users\User\.m2\repository\org\openjfx\javafx-graphics\18.0.1\javafx-graphics-18.0.1-win.jar;C:\Users\User\.m2\repository\org\openjfx\javafx-media\18.0.1\javafx-media-18.0.1-win.jar;C:\Users\User\.m2\repository\org\openjfx\javafx-web\18.0.1\javafx-web-18.0.1-win.jar;C:\Users\User\.m2\repository\uk\co\caprica\vlcj\4.7.1\vlcj-4.7.1.jar;C:\Users\User\.m2\repository\uk\co\caprica\vlcj-javafx\1.0.2\vlcj-javafx-1.0.2.jar, --add-modules, iptvportal, --output, E:\Programming\Eclipse\workspace\iptvportal\target\iptvportal_image, --strip-debug, --compress, 2, --no-header-files, --no-man-pages, --launcher, iptvportal_launcher=iptvportal/ru.iptvportal.App]
Error: Module jdk.jsobject not found, required by iptvportal
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:567)
    at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:434)
    at org.openjfx.JavaFXJLinkMojo.execute(JavaFXJLinkMojo.java:209)
    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:972)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    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:  4.505 s
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:567)
    at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:434)
    at org.openjfx.JavaFXJLinkMojo.execute(JavaFXJLinkMojo.java:209)
    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:972)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    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] Finished at: 2022-07-07T00:31:34+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.8:jlink (default-cli) on project iptvportal: Error: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.8:jlink (default-cli) on project iptvportal: Error
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
    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:972)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    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)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error
    at org.openjfx.JavaFXJLinkMojo.execute(JavaFXJLinkMojo.java:241)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
    ... 20 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
    at org.openjfx.JavaFXJLinkMojo.execute(JavaFXJLinkMojo.java:235)
    ... 22 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:567)
    at org.openjfx.JavaFXBaseMojo.executeCommandLine(JavaFXBaseMojo.java:434)
    at org.openjfx.JavaFXJLinkMojo.execute(JavaFXJLinkMojo.java:209)
    ... 22 more
[ERROR] 
[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

Suspicious place with JAVA_HOME and jlink:

[DEBUG] properties used {env.NUMBER_OF_PROCESSORS=4, env.USERPROFILE=C:\Users\User, java.specification.version=17, sun.cpu.isalist=amd64, sun.arch.data.model=64, env.PROGRAMW6432=C:\Program Files, java.vendor.url=https://adoptium.net/, env.OS=Windows_NT, sun.boot.library.path=C:\Users\User\.p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.3.v20220515-1416\jre\bin, sun.java.command=org.codehaus.plexus.classworlds.launcher.Launcher -B -X clean javafx:jlink, env.SYSTEMROOT=C:\Windows, jdk.debug=release, maven.version=3.8.4, java.specification.vendor=Oracle Corporation, java.version.date=2022-04-19, java.home=C:\Users\User\.p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.3.v20220515-1416\jre, java.vm.specification.vendor=Oracle Corporation, java.specification.name=Java Platform API Specification, env.LOCALAPPDATA=C:\Users\User\AppData\Local, env.USERDOMAIN_ROAMINGPROFILE=WIN-FVCCMCJ89IQ, user.script=, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, java.runtime.version=17.0.3+7, env.WEBOS_CLI_TV=C:\Software\webOS_TV_SDK\CLI\bin, env.PATH=C:/Users/User/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.3.v20220515-1416/jre/bin/server;C:/Users/User/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.3.v20220515-1416/jre/bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Software\Sdk\platform-tools;C:\Software\Sdk\tools;C:\Software\VirtualBox;C:\Software\VirtualBox_6.1.32;C:\software\nodejs\;C:\Software\tizen-studio\tools\ide\bin;C:\Program Files\Bandizip\;C:\Software\Mercurial;E:\Programming\Microsoft VS Code\bin;C:\Software\CMake\bin;C:\Users\User\AppData\Roaming\npm;C:\Users\User\Desktop;, env.PUBLIC=C:\Users\Public, env.COMMONPROGRAMW6432=C:\Program Files\Common Files, file.encoding=UTF-8, java.vendor.version=Temurin-17.0.3+7, env.COMPUTERNAME=WIN-FVCCMCJ89IQ, env.HOMEPATH=\Users\User, env.APPDATA=C:\Users\User\AppData\Roaming, java.io.tmpdir=C:\Users\User\AppData\Local\Temp\, java.version=17.0.3, maven-compiler.release=11, java.vm.specification.name=Java Virtual Machine Specification, native.encoding=Cp1251, java.library.path=C:\Users\User\.p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.3.v20220515-1416\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Users/User/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.3.v20220515-1416/jre/bin/server;C:/Users/User/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.3.v20220515-1416/jre/bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Software\Sdk\platform-tools;C:\Software\Sdk\tools;C:\Software\VirtualBox;C:\Software\VirtualBox_6.1.32;C:\software\nodejs\;C:\Software\tizen-studio\tools\ide\bin;C:\Program Files\Bandizip\;C:\Software\Mercurial;E:\Programming\Microsoft VS Code\bin;C:\Software\CMake\bin;C:\Users\User\AppData\Roaming\npm;C:\Users\User\Desktop;;., java.vendor=Eclipse Adoptium, classworlds.conf=E:\Programming\Eclipse\workspace\.metadata\.plugins\org.eclipse.m2e.launching\launches\m2conf6299535031719406823.tmp, sun.io.unicode.encoding=UnicodeLittle, java.vm.specification.version=17, os.name=Windows 7, env.=::=::\, maven.compiler.source=11, user.home=C:\Users\User, env.ALLUSERSPROFILE=C:\ProgramData, env.SESSIONNAME=Console, path.separator=;, os.version=6.1, env.PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC, java.vm.name=OpenJDK 64-Bit Server VM, env.WINDOWS_TRACING_LOGFILE=C:\BVTBin\Tests\installpackage\csilogfile.log, env.USERNAME=User, os.arch=amd64, maven.multiModuleProjectDirectory=E:\Programming\Eclipse\workspace\iptvportal, java.vm.info=mixed mode, env.TEMP=C:\Users\User\AppData\Local\Temp, java.class.version=61.0, vlcj.version=4.7.1, sun.jnu.encoding=Cp1251, vlcj-javafx.version=1.0.2, maven.build.version=Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537), maven.home=E:\Programming\Eclipse\workspace\iptvportal\EMBEDDED, env.JAVA_HOME="E:\Programming\Android Studio\jre", env.PROGRAMFILES=C:\Program Files, file.separator=\, java.vm.compressedOopsMode=32-bit, line.separator=
, env.PROCESSOR_REVISION=4501, env.PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 69 Stepping 1, GenuineIntel, env.PROGRAMDATA=C:\ProgramData, user.name=User, maven-compiler.version=3.8.1, env.SYSTEMDRIVE=C:, env.VBOX_MSI_INSTALL_PATH=C:\Software\VirtualBox_6.1.32\, env.PROGRAMFILES(X86)=C:\Program Files (x86), env.PROCESSOR_LEVEL=6, env.HOMEDRIVE=C:, env.PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\, env.TMP=C:\Users\User\AppData\Local\Temp, sun.os.patch.level=Service Pack 1, maven.compiler.target=11, env.LOGONSERVER=\\WIN-FVCCMCJ89IQ, env.WINDOWS_TRACING_FLAGS=3, env.LG_WEBOS_TV_SDK_HOME=C:\Software\webOS_TV_SDK, env.WINDIR=C:\Windows, env.MOZ_PLUGIN_PATH=C:\Software\Foxit Software\Foxit PDF Reader\plugins\, env.FP_NO_HOST_CHECK=NO, java.class.path=C:\Users\User\.p2\pool\plugins\org.eclipse.m2e.maven.runtime_1.18.3.20220227-1319\jars\plexus-classworlds-2.6.0.jar, java.vm.vendor=Eclipse Adoptium, env.PROCESSOR_ARCHITECTURE=AMD64, user.variant=, env.COMMONPROGRAMFILES=C:\Program Files\Common Files, javafx.version=18.0.1, sun.java.launcher=SUN_STANDARD, user.country=RU, env.USERDOMAIN=WIN-FVCCMCJ89IQ, env.COMSPEC=C:\Windows\system32\cmd.exe, sun.cpu.endian=little, user.language=ru, javafx-maven-plugin.version=0.0.8, java.runtime.name=OpenJDK Runtime Environment, project.build.sourceEncoding=UTF-8, env.COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files, java.vendor.url.bug=https://github.com/adoptium/adoptium-support/issues, user.dir=E:\Programming\Eclipse\workspace\iptvportal, java.vm.version=17.0.3+7}
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[DEBUG] resource with targetPath null
...
[DEBUG] Executable [E:\Programming\Android Studio\jre\bin\jlink.exe]
Dmitriy
  • 375
  • 1
  • 18
  • Please don't use dropfiles, instead put the logs in the question, formatted as code. – jewelsea Jul 06 '22 at 19:11
  • Ensure that `JAVA_HOME` is set correctly (if you don't know how to do this, it is OS-specific, so search for how to do so on your OS). The JavaFX Maven plugin will [use JAVA_HOME if it is defined](https://github.com/openjfx/javafx-maven-plugin/issues/46). – jewelsea Jul 06 '22 at 20:10
  • @jewelsea Too many characters, so dropfiles :( There is a line in the logs "env.JAVA_HOME="E:\Programming\Android Studio\jre", I successfully run javafx:run , but the jlink does not work. Is it normal to have such a JAVA_HOME? Jlink is taken from Android Studio too. – Dmitriy Jul 06 '22 at 21:26
  • Uninstall android studio and any other JDK or JRE installations you aren't using for your current development. Yes, setting JAVA_HOME is normal, here is how you set [JAVA_HOME on Windows](https://mkyong.com/java/how-to-set-java_home-on-windows-10/). It often does not need to be set as you can run the Java tools out of the bin directory, but if set, it should be correct. Some software when installed will set it (I guess android studio did), but it didn't set it to what you want. – jewelsea Jul 06 '22 at 21:54
  • Maven does have an alternate way of working our JDK installations other than JAVA_HOME, which is [Mavan toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html), but that is more sophisticated and I have not used it. I assume that the javafx maven plugin would use a toolchain if provided, but the fallback will be to JAVA_HOME if defined. – jewelsea Jul 06 '22 at 21:57
  • @jewelsea I downloaded the JDK that is used in the project and installed a new JAVA_HOME with it, but it didn't help. The error is exactly the same. I work in Android Studio, so maybe there is another way? I have seen what is possible in pom.xml in javafx-maven-plugin specify a specific JDK in the tag. I tried, but the result was the same... – Dmitriy Jul 06 '22 at 22:01
  • @jewelsea With the new "JAVA_HOME", "javafx:run" also succeeds, but "javafx:jlink" fails... – Dmitriy Jul 06 '22 at 22:03
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/246213/discussion-between-jewelsea-and--). – jewelsea Jul 06 '22 at 22:09

0 Answers0