简体   繁体   中英

Heroku / command : “git push heroku master” ERROR

I'm trying to run my Java app on Heroku, but the git push command is failing:

在此处输入图像描述

How do I fix that?

Once sent, I can't open the application in the browser enter image description here and enter image description here

According to the"Supported Java versions" :

Heroku currently uses OpenJDK 8 to run your application by default. OpenJDK versions 13, 12, 11, and 7 are also available.

it seems like your code is intended to use Java 11, but Heroku uses the default Java 8.

Just follow the docs and specify the version explicitly:

You can specify a Java version by adding a file called system.properties to your application:

java.runtime.version=11

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM