在目录中创建一个system.properties文件并提交到git. more infohttps://devcenter.heroku.com/articles/customizing-the-jdk#prerequisites
参见文档了解更多信息。
首先,使用git ls-files
检查system.properties
文件肯定进入了你的Git存储库。
其次,检查文件的前3个字节不是UTF-8BOM。
如果你不想像我一样在代码中添加一个额外的文件(system.properties),那么这个答案会有所帮助。
想法:更改javabuildpack jdk默认版本从1.8到11
步骤:
https://github.com/heroku/heroku-buildpack-java
. e.g.https://github.com/archongum/heroku-buildpack-java