Плагин JavaFX Maven Assembly продолжает упаковывать неправильную версию JDKJAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Плагин JavaFX Maven Assembly продолжает упаковывать неправильную версию JDK

Сообщение Anonymous »


I created an app in IntelliJ that allows me to read epubs without being to noticable when someone passes by my mac at work (iBook tends to stand out).. it's basically just an undecorated JavaFX window with a label that get fed a single paragraph tag in the epub at a time, controlled by the arrow keys to move forward and backwards.. The app compiles and packages great on my pc (JDK21) but when I try to build it for 1.8 (the java version at work) it keeps complaining that the app has been compiled in a newer version (55) than the version on the mac (52)..

it cleans, builds, packages without errors.. but when I try with the command line "java -jar readerfx.jar" it throws the error..

My guess is some version in the dependencies of the POM file is overriding the compiler version but I'm not sure what..

this is my POM.xml:

4.0.0 com.reader readerfx 1.0-SNAPSHOT UTF-8 1.8 1.8 org.openjfx javafx-controls 13 org.openjfx javafx-fxml 13 javax.xml.parsers jaxp-api 1.4 xml-apis xml-apis 1.0.b2 org.apache.maven.plugins maven-compiler-plugin 3.8.0 ${maven.compiler.source} ${maven.compiler.target} org.apache.maven.plugins maven-assembly-plugin 3.6.0 jar-with-dependencies com.reader.Launcher assemble-all package single What I tried so far:
  • downloaded, extracted and set my HOME and path variables to a 1.8 version of JAVA (openlogic-openjdk-8u402-b06-windows-64)
  • inside my IntelliJ settings, under Project, set my "SDK" to 1.8
  • inside my IntelliJ settings, under Project, set my "Language level" to 8
  • inside my IntelliJ settings, under Modules, set "Module SDK" to "Project SDK 1.8"
  • created a Launcher app that launches the main app
  • in my POM.xml file changed the "source" and "target" variables inside my maven-compiler-plugin configuration to 1.8
  • tried removing the depedency for "javafx-controls" and "javafx-fxml" since java 1.8 still had JavaFX in it's library but then it couldn't find the class javaFX.Application.application so I put them back in..
  • found somewhere online I could add a "version" and "target" to the configuration of the maven-assembly-plugin but when I add them IntelliJ says "Element source is not allowed here"


Источник: https://stackoverflow.com/questions/781 ... dk-version
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «JAVA»