heroku – system. Properties and Java version

I wanted to deploy my java 7 application to heroku, but I encountered some problems with the Java version

I added system. XML to my project root directory (where SRC and POM. XML) Properties file, the content is Java runtime. Version = 1.7, but I still get this:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project lets-code: Fatal error compiling: invalid target release: 1.7

So I'm confused about what to do next

Solution

The default version of Java on heroku is java 6 You need to follow the guidelines to make your Maven project run on a newer version of the JVM (1.7 or 1.8) You have set system Add the properties file to the project However, you may not update the path as specified, and Maven attempts to build your application using openjdk 6, which will result in an invalid target release exception

Updating the path should solve the problem

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>