0

Note: This post doesn't solve my problem, I compile AND run with same version.

I wanted to create maven Java FX project. I have followed this https://openjfx.io/openjfx-docs/#maven Even if I take their example https://github.com/openjfx/samples/tree/master/HelloFX/Maven and open it in Idea and try to run it, I get

    Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: C:\Users\force\.m2\repository\org\openjfx\javafx-base\13\javafx-base-13-win.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Unsupported major.minor version 55.0
[ERROR] Command execution failed.

The command running is

"C:\Program Files\Java\jdk-13.0.2\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\Users\me\Development\Java\fxtest "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\lib\idea_rt.jar=52546:C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar" org.codehaus.classworlds.Launcher -Didea.version2019.3.2 clean org.openjfx:javafx-maven-plugin:0.0.3:run

What is wrong? Why can't I run this simple example project?

kleopatra
  • 51,061
  • 28
  • 99
  • 211
stove
  • 556
  • 6
  • 24

1 Answers1

1

Did you set your JAVA_HOME environment variable correct?

For me it's working when I run the project with mvn clean javafx:run in eclipse.

Peter Lustig
  • 1,585
  • 1
  • 18
  • 34
  • Actually, I have different version in JAVA_HOME, but the whole command should be starting with java 13 - please see the command above :) Ok I tried to change JAVA_HOME and it works now. How it is possible that even after running it specifically with java 13 it still runs with java from JAVA_HOME? Do plugins run on different java version than maven? – stove Feb 26 '20 at 15:58