[英]IntelliJ IDEA 2016 project change java sdk version from 7 to 8
[英]Change Java Runtime Version in Intellij Idea
我正在將使用ktor構建的服務器部署到Heroku ,但是當我運行命令heroku open
時,我收到應用程序錯誤
以下顯示在日志中
Exception in thread "main" java.lang.UnsupportedClassVersionError:com/zaxxer/hikari/HikariConfig has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
當我運行heroku run java -version
我收到這個
openjdk version "1.8.0_312-heroku"
OpenJDK Runtime Environment (build 1.8.0_312-heroku-b05)
OpenJDK 64-Bit Server VM (build 25.312-b05, mixed mode)
如何在 Intellij IDEA 中更改Java運行時版本
You need to change the Java version on Heroku where you deploy the application (by default Heroku provides Java 8, as you correctly verified).
在項目根目錄中放置一個文件system.properties
,其中包含:
java.runtime.version=11
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.