2

I added system.properties file with the content java.runtime.version=11 to my application like described here, committed the changes and pushed afterwards with git push heroku master

unfortunately, Heroku still installs JDK 1.8:

...
remote: -----> Java app detected
remote: -----> Installing JDK 1.8... done
remote: -----> Installing Maven 3.3.9... done
...
...
...
remote:        [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project my-module-persistence: Fatal error compiling: invalid target release: 11 -> [Help 1]

What further/other steps do I have to do?

0

I had the same problem and want to post my solution here.

Make sure your system.properties file is in your root directory. Do not confuse this file with application.properties inside src/main/resources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.