Sto usando IntelliJ IDEA Ultimate 2019.3.1 . Ogni volta che provo ad avviare un semplice progetto Java Maven (potrebbe anche essere un semplice Hello World), ricevo il seguente errore:
Error:java: error: release version 5 not supported
In esecuzione java --versiondal terminale ottengo il seguente output:
openjdk 11.0.5 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Ubuntu-0ubuntu1.1)
OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Ubuntu-0ubuntu1.1, mixed mode, sharing)
In esecuzione javac --versiondal terminale ottengo il seguente output:
javac 11.0.5
Andando alle impostazioni del compilatore Java (come suggerito qui ) vedo questo:
Ho provato a modificare la " Versione bytecode di destinazione " su 1.8 ma ho i seguenti errori:
Error:(1, 26) java: package javafx.application does not exist
Error:(2, 20) java: package javafx.stage does not exist
Error:(4, 27) java: cannot find symbol
symbol: class Application
Error:(12, 23) java: cannot find symbol
symbol: class Stage
location: class Main
Error:(7, 9) java: cannot find symbol
symbol: method launch(java.lang.String[])
location: class Main
Error:(11, 5) java: method does not override or implement a method from a supertype
Modificandolo alla versione 1.11 ottengo invece questo errore:
Error:java: Source option 5 is no longer supported. Use 6 or later.
Quale pensi sia il problema? Come posso risolverlo?
