Heroku jar problems

Viewed 61

I created simple java app, built jar, and now I am trying to deploy it on heroku. The problem is that I can't setup right jdk version. I need jdk 17.0.2, but heroku provides only jdk 8 by default. I use heroku java cli plugin (https://github.com/heroku/plugin-java), and according to the documentation I created Procfile in folder with my jar:

web: java $JAVA_OPTS -jar <myjar>.jar -v 17.0.2 $JAR_OPTS.

but nothing has changed.

I've also tried deploy my jar like this:

heroku deploy:jar <myjar>.jar -v 17.0.2 -a <appname>
heroku deploy:jar <myjar>.jar -a <appname> -v 17.0.2

instead of simple:

heroku deploy:jar <myjar>.jar -a <appname>

but it also did't help. Since I'm trying to deploy jar, I can't use git and change jdk version by system.properties file. How can I solve this problem? Thanks for any help.

0 Answers
Related